[ASan]: re-enable noreturn attribute on posix
llvm-svn: 153082
This commit is contained in:
parent
7315c4b9cd
commit
cae79fbab9
|
@ -47,7 +47,7 @@ extern "C" void* _ReturnAddress(void);
|
|||
# define ALIAS(x) __attribute__((alias(x)))
|
||||
# define ALIGNED(x) __attribute__((aligned(x)))
|
||||
# define NOINLINE __attribute__((noinline))
|
||||
# define NORETURN // FIXME: should be __attribute__((noreturn)), revisit later.
|
||||
# define NORETURN __attribute__((noreturn))
|
||||
|
||||
# define ASAN_INTERFACE_ATTRIBUTE __attribute__((visibility("default")))
|
||||
#endif // defined(_WIN32)
|
||||
|
|
|
@ -106,7 +106,10 @@ size_t ReadFileToBuffer(const char *file_name, char **buff,
|
|||
|
||||
void AsanDie() {
|
||||
static int num_calls = 0;
|
||||
if (AtomicInc(&num_calls) > 1) return; // Don't die twice.
|
||||
if (AtomicInc(&num_calls) > 1) {
|
||||
// Don't die twice - run a busy loop.
|
||||
while (1) { }
|
||||
}
|
||||
if (FLAG_sleep_before_dying) {
|
||||
Report("Sleeping for %d second(s)\n", FLAG_sleep_before_dying);
|
||||
SleepForSeconds(FLAG_sleep_before_dying);
|
||||
|
|
Loading…
Reference in New Issue