Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
unifuzz-validate
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
文周繁
unifuzz-validate
Commits
3e8013bc
Commit
3e8013bc
authored
Dec 27, 2024
by
文周繁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:asan.py add remove duplication
parent
4d1763f6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletions
+18
-1
asan.py
asan.py
+18
-1
No files found.
asan.py
View file @
3e8013bc
...
@@ -4,7 +4,9 @@ import os
...
@@ -4,7 +4,9 @@ import os
import
re
import
re
pattern_asan_head
=
re
.
compile
(
r'==\d+==ERROR: AddressSanitizer:'
)
pattern_asan_head
=
re
.
compile
(
r'==\d+==ERROR: AddressSanitizer:'
)
pattern_asan
=
re
.
compile
(
r' {4}#\d+ 0x\w+ in '
)
pattern_asan_0
=
re
.
compile
(
r' {4}#0 0x\w+ in '
)
invalid_cause_dict
=
dict
()
def
search_file
(
dirname
):
def
search_file
(
dirname
):
paths
=
[]
paths
=
[]
...
@@ -26,8 +28,23 @@ def TIMEOUT_COMMAND(command, stdout, stderr):
...
@@ -26,8 +28,23 @@ def TIMEOUT_COMMAND(command, stdout, stderr):
process
=
subprocess
.
Popen
(
command
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
shell
=
True
)
process
=
subprocess
.
Popen
(
command
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
shell
=
True
)
outs
,
errs
=
process
.
communicate
()
outs
,
errs
=
process
.
communicate
()
stdout
.
write
(
outs
)
stdout
.
write
(
outs
)
is_search_0
=
False
search_by_count
=
0
error_cause
=
''
if
pattern_asan_head
.
search
(
errs
)
is
not
None
:
if
pattern_asan_head
.
search
(
errs
)
is
not
None
:
for
i
in
errs
.
splitlines
():
if
pattern_asan_0
.
match
(
i
)
is
not
None
and
not
is_search_0
:
is_search_0
=
True
_
,
end
=
pattern_asan_0
.
search
(
i
)
.
span
()
error_cause
+=
i
[
end
:]
elif
pattern_asan
.
match
(
i
)
is
not
None
and
search_by_count
<=
10
:
search_by_count
+=
1
_
,
end
=
pattern_asan
.
search
(
i
)
.
span
()
error_cause
+=
i
[
end
:]
if
not
invalid_cause_dict
.
has_key
(
error_cause
):
stderr
.
write
(
errs
)
stderr
.
write
(
errs
)
# TODO write to mangodb
invalid_cause_dict
[
error_cause
]
=
1
def
generation_command
(
target
,
parameter
,
paths
,
stdout_outputfile
,
stderr_outputfile
):
def
generation_command
(
target
,
parameter
,
paths
,
stdout_outputfile
,
stderr_outputfile
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment