mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-10 01:01:33 +00:00
bigger initial map when LTO
This commit is contained in:
parent
50a63777ec
commit
41f6aa7940
@ -236,15 +236,13 @@ static inline u8 *DFL_ck_memdup_str(u8 *mem, u32 size) {
|
|||||||
#define alloc_printf(_str...) \
|
#define alloc_printf(_str...) \
|
||||||
({ \
|
({ \
|
||||||
\
|
\
|
||||||
\
|
|
||||||
\
|
|
||||||
u8 *_tmp; \
|
u8 *_tmp; \
|
||||||
s32 _len = snprintf(NULL, 0, _str); \
|
s32 _len = snprintf(NULL, 0, _str); \
|
||||||
if (_len < 0) FATAL("Whoa, snprintf() fails?!"); \
|
if (_len < 0) FATAL("Whoa, snprintf() fails?!"); \
|
||||||
_tmp = ck_alloc(_len + 1); \
|
_tmp = ck_alloc(_len + 1); \
|
||||||
snprintf((char *)_tmp, _len + 1, _str); \
|
snprintf((char *)_tmp, _len + 1, _str); \
|
||||||
_tmp;
|
_tmp; \
|
||||||
|
\
|
||||||
})
|
})
|
||||||
|
|
||||||
/* Macro to enforce allocation limits as a last-resort defense against
|
/* Macro to enforce allocation limits as a last-resort defense against
|
||||||
@ -263,9 +261,7 @@ static inline u8 *DFL_ck_memdup_str(u8 *mem, u32 size) {
|
|||||||
\
|
\
|
||||||
if (!(_r)) ABORT("Out of memory: can't allocate %u bytes", (_s)); \
|
if (!(_r)) ABORT("Out of memory: can't allocate %u bytes", (_s)); \
|
||||||
\
|
\
|
||||||
}
|
} while (0)
|
||||||
|
|
||||||
while (0)
|
|
||||||
|
|
||||||
/* Magic tokens used to mark used / freed chunks. */
|
/* Magic tokens used to mark used / freed chunks. */
|
||||||
|
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
// to prevent the function from being removed
|
// to prevent the function from being removed
|
||||||
unsigned char __afl_lto_mode = 0;
|
unsigned char __afl_lto_mode = 0;
|
||||||
|
|
||||||
@ -17,6 +19,7 @@ unsigned char __afl_lto_mode = 0;
|
|||||||
|
|
||||||
__attribute__((constructor(0))) void __afl_auto_init_globals(void) {
|
__attribute__((constructor(0))) void __afl_auto_init_globals(void) {
|
||||||
|
|
||||||
|
if (getenv("AFL_DEBUG")) fprintf(stderr, "[__afl_auto_init_globals]\n");
|
||||||
__afl_lto_mode = 1;
|
__afl_lto_mode = 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,11 @@
|
|||||||
is used for instrumentation output before __afl_map_shm() has a chance to
|
is used for instrumentation output before __afl_map_shm() has a chance to
|
||||||
run. It will end up as .comm, so it shouldn't be too wasteful. */
|
run. It will end up as .comm, so it shouldn't be too wasteful. */
|
||||||
|
|
||||||
|
#ifdef AFL_REAL_LD
|
||||||
|
u8 __afl_area_initial[256000];
|
||||||
|
#else
|
||||||
u8 __afl_area_initial[MAP_SIZE];
|
u8 __afl_area_initial[MAP_SIZE];
|
||||||
|
#endif
|
||||||
u8 *__afl_area_ptr = __afl_area_initial;
|
u8 *__afl_area_ptr = __afl_area_initial;
|
||||||
u8 *__afl_dictionary;
|
u8 *__afl_dictionary;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user