mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-20 05:23:43 +00:00
fix standalone running with shared libs
This commit is contained in:
@ -5,7 +5,9 @@
|
|||||||
|
|
||||||
|
|
||||||
### Version ++4.04a (dev)
|
### Version ++4.04a (dev)
|
||||||
- ... your PR? :)
|
- fix gramatron and grammar_mutatur build scripts
|
||||||
|
- afl-cc:
|
||||||
|
- make gcc_mode (afl-gcc-fast) work with gcc down to version 3.6
|
||||||
|
|
||||||
|
|
||||||
### Version ++4.03c (release)
|
### Version ++4.03c (release)
|
||||||
|
@ -348,7 +348,7 @@ static void __afl_map_shm(void) {
|
|||||||
u32 val = 0;
|
u32 val = 0;
|
||||||
u8 *ptr;
|
u8 *ptr;
|
||||||
|
|
||||||
if ((ptr = getenv("AFL_MAP_SIZE")) != NULL) val = atoi(ptr);
|
if ((ptr = getenv("AFL_MAP_SIZE")) != NULL) { val = atoi(ptr); }
|
||||||
|
|
||||||
if (val > MAP_INITIAL_SIZE) {
|
if (val > MAP_INITIAL_SIZE) {
|
||||||
|
|
||||||
@ -1375,17 +1375,17 @@ __attribute__((constructor(1))) void __afl_auto_second(void) {
|
|||||||
if (getenv("AFL_DISABLE_LLVM_INSTRUMENTATION")) return;
|
if (getenv("AFL_DISABLE_LLVM_INSTRUMENTATION")) return;
|
||||||
u8 *ptr;
|
u8 *ptr;
|
||||||
|
|
||||||
if (__afl_final_loc) {
|
if (__afl_final_loc > MAP_INITIAL_SIZE) {
|
||||||
|
|
||||||
if (__afl_area_ptr && __afl_area_ptr != __afl_area_initial)
|
if (__afl_area_ptr && __afl_area_ptr != __afl_area_initial)
|
||||||
free(__afl_area_ptr);
|
free(__afl_area_ptr);
|
||||||
|
|
||||||
if (__afl_map_addr)
|
if (__afl_map_addr)
|
||||||
ptr = (u8 *)mmap((void *)__afl_map_addr, __afl_final_loc,
|
ptr = (u8 *)mmap((void *)__afl_map_addr, __afl_final_loc + 2,
|
||||||
PROT_READ | PROT_WRITE,
|
PROT_READ | PROT_WRITE,
|
||||||
MAP_FIXED_NOREPLACE | MAP_SHARED | MAP_ANONYMOUS, -1, 0);
|
MAP_FIXED_NOREPLACE | MAP_SHARED | MAP_ANONYMOUS, -1, 0);
|
||||||
else
|
else
|
||||||
ptr = (u8 *)malloc(__afl_final_loc);
|
ptr = (u8 *)malloc(__afl_final_loc + 2);
|
||||||
|
|
||||||
if (ptr && (ssize_t)ptr != -1) {
|
if (ptr && (ssize_t)ptr != -1) {
|
||||||
|
|
||||||
@ -1407,6 +1407,8 @@ __attribute__((constructor(0))) void __afl_auto_first(void) {
|
|||||||
__afl_already_initialized_first = 1;
|
__afl_already_initialized_first = 1;
|
||||||
|
|
||||||
if (getenv("AFL_DISABLE_LLVM_INSTRUMENTATION")) return;
|
if (getenv("AFL_DISABLE_LLVM_INSTRUMENTATION")) return;
|
||||||
|
|
||||||
|
/*
|
||||||
u8 *ptr = (u8 *)malloc(MAP_INITIAL_SIZE);
|
u8 *ptr = (u8 *)malloc(MAP_INITIAL_SIZE);
|
||||||
|
|
||||||
if (ptr && (ssize_t)ptr != -1) {
|
if (ptr && (ssize_t)ptr != -1) {
|
||||||
@ -1416,6 +1418,8 @@ __attribute__((constructor(0))) void __afl_auto_first(void) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
} // ptr memleak report is a false positive
|
} // ptr memleak report is a false positive
|
||||||
|
|
||||||
/* The following stuff deals with supporting -fsanitize-coverage=trace-pc-guard.
|
/* The following stuff deals with supporting -fsanitize-coverage=trace-pc-guard.
|
||||||
|
Reference in New Issue
Block a user