Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AFLplusplus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ulf Kargén
AFLplusplus
Commits
e5bdba4b
Unverified
Commit
e5bdba4b
authored
4 years ago
by
van Hauser
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #807 from AFLplusplus/dev
push to stable
parents
e5491025
c725cb71
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/afl-fuzz.c
+11
-11
11 additions, 11 deletions
src/afl-fuzz.c
test/test-llvm.sh
+2
-2
2 additions, 2 deletions
test/test-llvm.sh
with
13 additions
and
13 deletions
src/afl-fuzz.c
+
11
−
11
View file @
e5bdba4b
...
@@ -1596,9 +1596,9 @@ int main(int argc, char **argv_orig, char **envp) {
...
@@ -1596,9 +1596,9 @@ int main(int argc, char **argv_orig, char **envp) {
&
afl
->
fsrv
,
afl
->
argv
,
&
afl
->
stop_soon
,
afl
->
afl_env
.
afl_debug_child
);
&
afl
->
fsrv
,
afl
->
argv
,
&
afl
->
stop_soon
,
afl
->
afl_env
.
afl_debug_child
);
// only reinitialize when it makes sense
// only reinitialize when it makes sense
if
(
map_size
<
new_map_size
||
if
(
(
map_size
<
new_map_size
||
(
!
afl
->
cmplog_binary
&&
new_map_size
<
map_size
&&
(
new_map_size
!=
MAP_SIZE
&&
new_map_size
<
map_size
&&
map_size
-
new_map_size
>
MAP_SIZE
))
{
map_size
-
new_map_size
>
MAP_SIZE
))
)
{
OKF
(
"Re-initializing maps to %u bytes"
,
new_map_size
);
OKF
(
"Re-initializing maps to %u bytes"
,
new_map_size
);
...
@@ -1644,7 +1644,7 @@ int main(int argc, char **argv_orig, char **envp) {
...
@@ -1644,7 +1644,7 @@ int main(int argc, char **argv_orig, char **envp) {
if
(
map_size
<=
8000000
&&
!
afl
->
non_instrumented_mode
&&
if
(
map_size
<=
8000000
&&
!
afl
->
non_instrumented_mode
&&
!
afl
->
fsrv
.
qemu_mode
&&
!
afl
->
unicorn_mode
)
{
!
afl
->
fsrv
.
qemu_mode
&&
!
afl
->
unicorn_mode
)
{
afl
->
fsrv
.
map_size
=
8000000
;
// dummy temporary value
afl
->
cmplog_
fsrv
.
map_size
=
8000000
;
// dummy temporary value
setenv
(
"AFL_MAP_SIZE"
,
"8000000"
,
1
);
setenv
(
"AFL_MAP_SIZE"
,
"8000000"
,
1
);
}
}
...
@@ -1654,8 +1654,7 @@ int main(int argc, char **argv_orig, char **envp) {
...
@@ -1654,8 +1654,7 @@ int main(int argc, char **argv_orig, char **envp) {
afl
->
afl_env
.
afl_debug_child
);
afl
->
afl_env
.
afl_debug_child
);
// only reinitialize when it needs to be larger
// only reinitialize when it needs to be larger
if
(
map_size
<
new_map_size
||
if
(
map_size
<
new_map_size
)
{
(
new_map_size
<
map_size
&&
map_size
-
new_map_size
>
MAP_SIZE
))
{
OKF
(
"Re-initializing maps to %u bytes due cmplog"
,
new_map_size
);
OKF
(
"Re-initializing maps to %u bytes due cmplog"
,
new_map_size
);
...
@@ -1674,22 +1673,23 @@ int main(int argc, char **argv_orig, char **envp) {
...
@@ -1674,22 +1673,23 @@ int main(int argc, char **argv_orig, char **envp) {
afl_fsrv_kill
(
&
afl
->
fsrv
);
afl_fsrv_kill
(
&
afl
->
fsrv
);
afl_fsrv_kill
(
&
afl
->
cmplog_fsrv
);
afl_fsrv_kill
(
&
afl
->
cmplog_fsrv
);
afl_shm_deinit
(
&
afl
->
shm
);
afl_shm_deinit
(
&
afl
->
shm
);
afl
->
cmplog_fsrv
.
map_size
=
new_map_size
;
// non-cmplog stays the same
afl
->
cmplog_fsrv
.
map_size
=
new_map_size
;
// non-cmplog stays the same
map_size
=
new_map_size
;
setenv
(
"AFL_NO_AUTODICT"
,
"1"
,
1
);
// loaded already
afl
->
fsrv
.
trace_bits
=
afl
->
fsrv
.
trace_bits
=
afl_shm_init
(
&
afl
->
shm
,
new_map_size
,
afl
->
non_instrumented_mode
);
afl_shm_init
(
&
afl
->
shm
,
new_map_size
,
afl
->
non_instrumented_mode
);
setenv
(
"AFL_NO_AUTODICT"
,
"1"
,
1
);
// loaded already
afl_fsrv_start
(
&
afl
->
fsrv
,
afl
->
argv
,
&
afl
->
stop_soon
,
afl_fsrv_start
(
&
afl
->
fsrv
,
afl
->
argv
,
&
afl
->
stop_soon
,
afl
->
afl_env
.
afl_debug_child
);
afl
->
afl_env
.
afl_debug_child
);
afl_fsrv_start
(
&
afl
->
cmplog_fsrv
,
afl
->
argv
,
&
afl
->
stop_soon
,
afl_fsrv_start
(
&
afl
->
cmplog_fsrv
,
afl
->
argv
,
&
afl
->
stop_soon
,
afl
->
afl_env
.
afl_debug_child
);
afl
->
afl_env
.
afl_debug_child
);
map_size
=
new_map_size
;
}
else
{
}
afl
->
cmplog_fsrv
.
map_size
=
new_map_size
;
afl
->
cmplog_fsrv
.
map_size
=
map_size
;
}
OKF
(
"Cmplog forkserver successfully started"
);
OKF
(
"Cmplog forkserver successfully started"
);
...
...
This diff is collapsed.
Click to expand it.
test/test-llvm.sh
+
2
−
2
View file @
e5bdba4b
...
@@ -162,9 +162,9 @@ test -e ../afl-clang-fast -a -e ../split-switches-pass.so && {
...
@@ -162,9 +162,9 @@ test -e ../afl-clang-fast -a -e ../split-switches-pass.so && {
test
-e
test-floatingpoint
&&
{
test
-e
test-floatingpoint
&&
{
mkdir
-p
in
mkdir
-p
in
echo
ZZZZ
>
in
/in
echo
ZZZZ
>
in
/in
$ECHO
"
$GREY
[*] running afl-fuzz with floating point splitting, this will take max.
30
seconds"
$ECHO
"
$GREY
[*] running afl-fuzz with floating point splitting, this will take max.
45
seconds"
{
{
AFL_BENCH_UNTIL_CRASH
=
1
AFL_NO_UI
=
1 ../afl-fuzz
-Z
-s
1
-V
30
-m
${
MEM_LIMIT
}
-i
in
-o
out
-D
--
./test-floatingpoint
>>
errors 2>&1
AFL_BENCH_UNTIL_CRASH
=
1
AFL_NO_UI
=
1 ../afl-fuzz
-Z
-s
1
-V
45
-m
${
MEM_LIMIT
}
-i
in
-o
out
-D
--
./test-floatingpoint
>>
errors 2>&1
}
>>
errors 2>&1
}
>>
errors 2>&1
test
-n
"
$(
ls
out/default/crashes/id:
*
2>/dev/null
)
"
&&
{
test
-n
"
$(
ls
out/default/crashes/id:
*
2>/dev/null
)
"
&&
{
$ECHO
"
$GREEN
[+] llvm_mode laf-intel floatingpoint splitting feature works correctly"
$ECHO
"
$GREEN
[+] llvm_mode laf-intel floatingpoint splitting feature works correctly"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment