mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 11:08:06 +00:00
try repeating write
This commit is contained in:
@ -145,7 +145,7 @@ else
|
|||||||
CFLAGS ?= -O2 $(CFLAGS_OPT) # -funroll-loops is slower on modern compilers
|
CFLAGS ?= -O2 $(CFLAGS_OPT) # -funroll-loops is slower on modern compilers
|
||||||
endif
|
endif
|
||||||
|
|
||||||
override CFLAGS += -g -Wno-pointer-sign -Wno-variadic-macros -Wall -Wextra -Wpointer-arith \
|
override CFLAGS += -g -Wno-pointer-sign -Wno-variadic-macros -Wall -Wextra -Wno-pointer-arith \
|
||||||
-fPIC -I include/ -DAFL_PATH=\"$(HELPER_PATH)\" \
|
-fPIC -I include/ -DAFL_PATH=\"$(HELPER_PATH)\" \
|
||||||
-DBIN_PATH=\"$(BIN_PATH)\" -DDOC_PATH=\"$(DOC_PATH)\"
|
-DBIN_PATH=\"$(BIN_PATH)\" -DDOC_PATH=\"$(DOC_PATH)\"
|
||||||
# -fstack-protector
|
# -fstack-protector
|
||||||
|
Submodule custom_mutators/grammar_mutator/grammar_mutator updated: cbe5e32752...ff4e5a265d
@ -358,17 +358,36 @@ static inline const char *colorfilter(const char *x) {
|
|||||||
#define ck_write(fd, buf, len, fn) \
|
#define ck_write(fd, buf, len, fn) \
|
||||||
do { \
|
do { \
|
||||||
\
|
\
|
||||||
|
if (len <= 0) break; \
|
||||||
int _fd = (fd); \
|
int _fd = (fd); \
|
||||||
|
s32 _written = 0, _off = 0, _len = (s32)(len); \
|
||||||
\
|
\
|
||||||
s32 _len = (s32)(len); \
|
do { \
|
||||||
s32 _res = write(_fd, (buf), _len); \
|
\
|
||||||
if (_res != _len) { \
|
s32 _res = write(_fd, (buf) + _off, _len); \
|
||||||
|
if (_res != _len && (_res > 0 && _written + _res != _len)) { \
|
||||||
|
\
|
||||||
|
if (_res > 0) { \
|
||||||
|
\
|
||||||
|
_written += _res; \
|
||||||
|
_len -= _res; \
|
||||||
|
_off += _res; \
|
||||||
|
\
|
||||||
|
} else { \
|
||||||
\
|
\
|
||||||
RPFATAL(_res, "Short write to %s, fd %d (%d of %d bytes)", fn, _fd, \
|
RPFATAL(_res, "Short write to %s, fd %d (%d of %d bytes)", fn, _fd, \
|
||||||
_res, _len); \
|
_res, _len); \
|
||||||
\
|
\
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
|
} else { \
|
||||||
|
\
|
||||||
|
break; \
|
||||||
|
\
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
} while (1); \
|
||||||
|
\
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define ck_read(fd, buf, len, fn) \
|
#define ck_read(fd, buf, len, fn) \
|
||||||
|
Submodule unicorn_mode/unicornafl updated: d4915053d4...a44fa94488
Reference in New Issue
Block a user