mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-19 18:09:47 +01:00
fuzz: Pass SystemRoot
environment variable to subprocess
See https://docs.python.org/3/library/subprocess.html
This commit is contained in:
parent
23cb8207cd
commit
52933d7283
@ -11,6 +11,7 @@ import argparse
|
||||
import configparser
|
||||
import logging
|
||||
import os
|
||||
import platform
|
||||
import random
|
||||
import subprocess
|
||||
import sys
|
||||
@ -18,7 +19,7 @@ import sys
|
||||
|
||||
def get_fuzz_env(*, target, source_dir):
|
||||
symbolizer = os.environ.get('LLVM_SYMBOLIZER_PATH', "/usr/bin/llvm-symbolizer")
|
||||
return {
|
||||
fuzz_env = {
|
||||
'FUZZ': target,
|
||||
'UBSAN_OPTIONS':
|
||||
f'suppressions={source_dir}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1',
|
||||
@ -27,6 +28,10 @@ def get_fuzz_env(*, target, source_dir):
|
||||
'ASAN_SYMBOLIZER_PATH':symbolizer,
|
||||
'MSAN_SYMBOLIZER_PATH':symbolizer,
|
||||
}
|
||||
if platform.system() == "Windows":
|
||||
# On Windows, `env` option must include valid `SystemRoot`.
|
||||
fuzz_env = {**fuzz_env, 'SystemRoot': os.environ.get('SystemRoot')}
|
||||
return fuzz_env
|
||||
|
||||
|
||||
def main():
|
||||
|
Loading…
Reference in New Issue
Block a user