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
834bfd08
Commit
834bfd08
authored
Mar 25, 2025
by
文周繁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复部分程序无法用utf-8解码和asan程序未上传时报错的问题
parent
ee44c51b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
validation.py
validation.py
+12
-11
No files found.
validation.py
View file @
834bfd08
...
...
@@ -50,7 +50,7 @@ def exec_command(crashes_collection, usage, command, seed_id: ObjectId):
error_cause
=
''
process
=
subprocess
.
Popen
(
command
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
shell
=
True
)
_
,
errs
=
process
.
communicate
()
errs
=
str
(
errs
,
"utf-8"
)
errs
=
str
(
errs
,
"utf-8"
,
errors
=
'ignore'
)
if
usage
==
"valgrind"
:
err_data
=
''
search_at_count
=
0
...
...
@@ -152,16 +152,17 @@ def main(argv):
fs
=
GridFS
(
default_db
,
fs_name
)
# 根据ObjectId查找文件
print
(
software
[
"asan_file"
])
asan_file_data
=
fs
.
get
(
software
[
"asan_file"
])
if
asan_file_data
:
# 确保下载目录存在
os
.
makedirs
(
os
.
path
.
dirname
(
asan_file_path
),
exist_ok
=
True
)
# 读取文件内容并保存到本地
with
open
(
asan_file_path
,
"wb"
)
as
f
:
f
.
write
(
asan_file_data
.
read
())
os
.
system
(
f
"chmod +x {asan_file_path}"
)
print
(
"asan_file download successfully"
)
generation_command
(
crashes_collection
,
asan_file_path
,
parameter
,
crashes_file_paths
,
""
)
if
software
[
"asan_file"
]
is
not
None
:
asan_file_data
=
fs
.
get
(
software
[
"asan_file"
])
if
asan_file_data
:
# 确保下载目录存在
os
.
makedirs
(
os
.
path
.
dirname
(
asan_file_path
),
exist_ok
=
True
)
# 读取文件内容并保存到本地
with
open
(
asan_file_path
,
"wb"
)
as
f
:
f
.
write
(
asan_file_data
.
read
())
os
.
system
(
f
"chmod +x {asan_file_path}"
)
print
(
"asan_file download successfully"
)
generation_command
(
crashes_collection
,
asan_file_path
,
parameter
,
crashes_file_paths
,
""
)
finally
:
task_collection
.
update_one
({
"_id"
:
ObjectId
(
task_id
)},
{
"$set"
:
{
"verification"
:
"VERIFIED"
}})
host_node
=
host_node_collection
.
find_one
({
"_id"
:
ObjectId
(
host_node_id
)})
...
...
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