rules_fuzzing icon indicating copy to clipboard operation
rules_fuzzing copied to clipboard

Support executing fuzz tests with custom environment variables

Open zhenyudg opened this issue 2 years ago • 3 comments

Requested Behavior

Specifying an env dictionary of environment variables in a cc_fuzz_test causes the regression test and fuzz test to execute with the environment variables set.

Actual Behavior

Specifying an env dictionary of environment variables currently has no effect on the regression and fuzz tests.

Motivation

We use environment variables to configure sanitizers (e.g., where to look for runtime suppressions, UBSan should crash upon finding UB, print a stack trace).

I'm presently working on extending rules_fuzzing to support env.

zhenyudg avatar Mar 08 '23 18:03 zhenyudg

I'll also try to add support for env_inherit at the save time as well

zhenyudg avatar Mar 08 '23 19:03 zhenyudg

Edit: I take it back, actually. I'm passing ASAN_OPTIONS and ASAN_SYMBOLIZER_PATH as part of env for the cc_fuzz_test and both do seem to be picked up correctly. I was mislead by LLVMSymbolizer: error reading file: No such file or directory in the output but apparently this is just a bad error message in llvm-symbolizer that was fixed in https://reviews.llvm.org/D148032. Are you seeing different behavior?

sfc-gh-ebrossard avatar Apr 05 '24 17:04 sfc-gh-ebrossard

@sfc-gh-ebrossard So sorry for the long delay in responding; I am no longer an active user of rules_fuzzing, so I'm afraid that I am no longer in a position to provide assistance (at least for now).

zhenyudg avatar Jul 05 '24 01:07 zhenyudg