mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-19 18:15:18 -07:00
Improve AX_CHECK_CATCHABLE_SEGV
This commit is contained in:
parent
35e1fdf5da
commit
ffcf899875
@ -24,6 +24,8 @@ size_t i;
|
||||
signal(SIGSEGV, sig);
|
||||
signal(SIGBUS, sig);
|
||||
#if !defined(__SANITIZE_ADDRESS__) && !defined(__EMSCRIPTEN__)
|
||||
*((volatile unsigned char *) -1) = 0xd0;
|
||||
*((volatile unsigned char *) 1) = 0xd0;
|
||||
for (i = 0; i < 10000000; i += 1024) { x[-i] = x[i] = (unsigned char) i; }
|
||||
#endif
|
||||
free((void *) x);
|
||||
|
Loading…
Reference in New Issue
Block a user