fix speculative usage of <sys/shm.h> in AFL runtime (#1278)

master
Hannes Mehnert 2017-08-09 14:59:05 +01:00 committed by Mark Shinwell
parent 837ecff306
commit 27a7226a19
3 changed files with 10 additions and 3 deletions

View File

@ -264,6 +264,9 @@ Working version
- GPR#1275: correct configure test for Spacetime availability
(Mark Shinwell)
- GPR#1278: discover presence of <sys/shm.h> during configure for afl runtime
(Hannes Mehnert)
### Internal/compiler-libs changes:
- MPR#6826, GPR#828, GPR#834: improve compilation time for open

View File

@ -13,9 +13,9 @@
/**************************************************************************/
/* Runtime support for afl-fuzz */
#include "caml/config.h"
/* Android's libc does not implement System V shared memory. */
#if defined(_WIN32) || defined(__ANDROID__)
#if !defined(HAS_SYS_SHM_H)
#include "caml/mlvalues.h"
@ -159,4 +159,4 @@ CAMLprim value caml_reset_afl_instrumentation(value full)
return Val_unit;
}
#endif /* _WIN32 */
#endif /* HAS_SYS_SHM_H */

4
configure vendored
View File

@ -1541,6 +1541,10 @@ if sh ./hasgot getauxval; then
echo "#define HAS_GETAUXVAL" >> s.h
fi
if sh ./hasgot -i sys/shm.h; then
inf "sys/shm.h found."
echo "#define HAS_SYS_SHM_H" >> s.h
fi
# Determine if the debugger is supported