diff options
| author | Kostya Serebryany <kcc@google.com> | 2014-12-16 19:13:01 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2014-12-16 19:13:01 +0000 |
| commit | 43eb7735f2c301b1b13773a49a3e60d8cfcad837 (patch) | |
| tree | 54b1a2dfebedbee15fcc9913705d54fa521af018 /compiler-rt/lib/sanitizer_common/sanitizer_libc.h | |
| parent | b4767437263b0adc967712933376e7df3854076e (diff) | |
| download | bcm5719-llvm-43eb7735f2c301b1b13773a49a3e60d8cfcad837.tar.gz bcm5719-llvm-43eb7735f2c301b1b13773a49a3e60d8cfcad837.zip | |
[asan] new flag: hard_rss_limit_mb
llvm-svn: 224353
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_libc.h')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_libc.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_libc.h b/compiler-rt/lib/sanitizer_common/sanitizer_libc.h index 6995626821a..9321e87360a 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_libc.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_libc.h @@ -98,6 +98,25 @@ int internal_fork(); // Threading uptr internal_sched_yield(); +// These functions call appropriate pthread_ functions directly, bypassing +// the interceptor. They are weak and may not be present in some tools. +SANITIZER_WEAK_ATTRIBUTE +int real_pthread_create(void *th, void *attr, void *(*callback)(void *), + void *param); +SANITIZER_WEAK_ATTRIBUTE +int real_pthread_join(void *th, void **ret); + +#define DEFINE_REAL_PTHREAD_FUNCTIONS \ + namespace __sanitizer { \ + int real_pthread_create(void *th, void *attr, void *(*callback)(void *), \ + void *param) { \ + return REAL(pthread_create)(th, attr, callback, param); \ + } \ + int real_pthread_join(void *th, void **ret) { \ + return REAL(pthread_join(th, ret)); \ + } \ + } // namespace __sanitizer + // Error handling bool internal_iserror(uptr retval, int *rverrno = 0); |

