Skip to content

Commit

Permalink
Fix problem with ASAN_OPTIONS for fuzzing pipeline (microsoft#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn authored Dec 13, 2023
1 parent fed618a commit 89312bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
8 changes: 7 additions & 1 deletion build/OneFuzzConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@
"OneFuzzJobs": [
{
"ProjectName": "Direct3D",
"TargetName": "DirectXTK12"
"TargetName": "DirectXTK12",
"TargetOptions": [
" -rss_limit_mb=4096"
],
"TargetEnv": {
"ASAN_OPTIONS": "allocator_may_return_null=1"
}
}
],
"JobDependencies": [
Expand Down
17 changes: 0 additions & 17 deletions build/onefuzz-setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,6 @@ function Execute-Setup {
# Exclude any uploaded DLL from known DLLs
gci -filter '*.dll' | Exclude-Library

# Update environment values for ASAN_OPTIONS.
# These environment variables affect how the ASan runtime operates.
# Use the 'allocator_may_return_null=1' environment variable if you have compiled
# your fuzzer using clang with the ASan flags
#
# Use 'windows_hook_rtl_allocators=true:allocator_may_return_null=1' if your fuzzer has
# been compiled using MSVC with the ASan flags
#
# $AsanOptions = 'windows_hook_rtl_allocators=true:allocator_may_return_null=1'
# $AsanOptions = 'allocator_may_return_null=1'

$AsanOptions = 'windows_hook_rtl_allocators=true:allocator_may_return_null=1'

# Use the 'machine' scope to make this permanent because the machine will reboot
[Environment]::SetEnvironmentVariable('ASAN_OPTIONS', $AsanOptions, 'Machine')
Write-Log "Set ASAN_OPTIONS to $AsanOptions"

# Done. Useful to know that the script did not prematurely error out
Write-Log 'Setup script finished successfully'
}
Expand Down

0 comments on commit 89312bb

Please sign in to comment.