Displaying 2 results from an estimated 2 matches for "segsegv".
Did you mean:
sigsegv
2017 Dec 23
0
Hoisting in the presence of volatile loads.
...andler
aborts the program?
For example:
int *normal = ADDRESS1;
volatile int* ptr = ADDRESS2;
int k = *ptr; // segfaults, and the signal handler calls abort()
int value = *normal; // this may be UB(undefined behavior).
Let's assume that normal is dereferenceable if ptr1 does not raise SEGSEGV,
but accessing normal raises UB if ptr1 raises SEGSEGV.
Before reordering is done, there's no UB because the program will always
abort if UB could happen, but UB may happen after they are reordered.
Best Regards,
Juneyoung Lee
On Thu, Dec 21, 2017 at 4:50 AM, Krzysztof Parzyszek via llvm-dev...
2017 Dec 20
4
Hoisting in the presence of volatile loads.
On 12/20/2017 1:37 PM, Sanjoy Das wrote:>
> Fwiw, I was under the impression that regular loads could *not* be
> reordered with volatile loads since we could have e.g.:
>
> int *normal = &global_variable;
> volatile int* ptr = 0;
> int k = *ptr; // segfaults, and the signal handler writes to *normal
> int value = *normal;
>
> and that we'd have