forked from OSchip/llvm-project
tsan: add memory range access functions to public iface
llvm-svn: 168692
This commit is contained in:
parent
96c39f733f
commit
210c21129e
|
@ -44,6 +44,9 @@ void __tsan_vptr_update(void **vptr_p, void *new_val);
|
|||
void __tsan_func_entry(void *call_pc);
|
||||
void __tsan_func_exit();
|
||||
|
||||
void __tsan_read_range(void *addr, unsigned long size); // NOLINT
|
||||
void __tsan_write_range(void *addr, unsigned long size); // NOLINT
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
|
|
@ -63,3 +63,11 @@ void __tsan_func_entry(void *pc) {
|
|||
void __tsan_func_exit() {
|
||||
FuncExit(cur_thread());
|
||||
}
|
||||
|
||||
void __tsan_read_range(void *addr, uptr size) {
|
||||
MemoryAccessRange(cur_thread(), CALLERPC, (uptr)addr, size, false);
|
||||
}
|
||||
|
||||
void __tsan_write_range(void *addr, uptr size) {
|
||||
MemoryAccessRange(cur_thread(), CALLERPC, (uptr)addr, size, true);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue