Skip to content

Commit a847c76

Browse files
authored
Fix problem with ASAN_OPTIONS for fuzzing pipeline (#418)
1 parent 75d8e82 commit a847c76

File tree

2 files changed

+7
-18
lines changed

2 files changed

+7
-18
lines changed

build/OneFuzzConfig.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212
"OneFuzzJobs": [
1313
{
1414
"ProjectName": "Direct3D",
15-
"TargetName": "DirectXTK"
15+
"TargetName": "DirectXTK",
16+
"TargetOptions": [
17+
" -rss_limit_mb=4096"
18+
],
19+
"TargetEnv": {
20+
"ASAN_OPTIONS": "allocator_may_return_null=1"
21+
}
1622
}
1723
],
1824
"JobDependencies": [

build/onefuzz-setup.ps1

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,6 @@ function Execute-Setup {
77
# Exclude any uploaded DLL from known DLLs
88
gci -filter '*.dll' | Exclude-Library
99

10-
# Update environment values for ASAN_OPTIONS.
11-
# These environment variables affect how the ASan runtime operates.
12-
# Use the 'allocator_may_return_null=1' environment variable if you have compiled
13-
# your fuzzer using clang with the ASan flags
14-
#
15-
# Use 'windows_hook_rtl_allocators=true:allocator_may_return_null=1' if your fuzzer has
16-
# been compiled using MSVC with the ASan flags
17-
#
18-
# $AsanOptions = 'windows_hook_rtl_allocators=true:allocator_may_return_null=1'
19-
# $AsanOptions = 'allocator_may_return_null=1'
20-
21-
$AsanOptions = 'windows_hook_rtl_allocators=true:allocator_may_return_null=1'
22-
23-
# Use the 'machine' scope to make this permanent because the machine will reboot
24-
[Environment]::SetEnvironmentVariable('ASAN_OPTIONS', $AsanOptions, 'Machine')
25-
Write-Log "Set ASAN_OPTIONS to $AsanOptions"
26-
2710
# Done. Useful to know that the script did not prematurely error out
2811
Write-Log 'Setup script finished successfully'
2912
}

0 commit comments

Comments
 (0)