forked from OSchip/llvm-project
parent
f8abe8c825
commit
0e05d6eb9c
|
@ -1156,8 +1156,12 @@ void internal_join_thread(void *th) {}
|
|||
#endif
|
||||
|
||||
bool GetSigContextWriteFlag(void *context) {
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
ucontext_t *ucontext = (ucontext_t*)context;
|
||||
return ucontext->uc_mcontext.gregs[REG_ERR] & 2;
|
||||
#else
|
||||
return false; // FIXME: Implement.
|
||||
#endif
|
||||
}
|
||||
|
||||
void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// RUN: %clangxx_asan -O0 %s -o %t
|
||||
// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=READ
|
||||
// RUN: not %run %t write 2>&1 | FileCheck %s --check-prefix=WRITE
|
||||
// REQUIRES: x86_64-supported-target
|
||||
|
||||
static volatile int sink;
|
||||
__attribute__((noinline)) void Read(int *ptr) { sink = *ptr; }
|
||||
|
|
Loading…
Reference in New Issue