Collect envs in AsanModuleBuilder::default() (#2921)
* collect envs in AsanModuleBuilder::default * migration * fmt
This commit is contained in:
parent
84702d12a8
commit
6648bc90d2
@ -5,6 +5,7 @@
|
||||
- `EventProcessor` is responsible for evaluating the testcases passed by the `EventReceiver`.
|
||||
- Since we don't evaluate testcases in the `EventManager` anymore. `on_fire` and `post_exec` have been deleted from `EventManagerHook`.
|
||||
- Similarly `pre_exec` has been renamed to `pre_receive`.
|
||||
- `AsanModule` now uses a `builder()` method for constructing its instances.
|
||||
|
||||
# 0.14.1 -> 0.15.0
|
||||
- `MmapShMem::new` and `MmapShMemProvider::new_shmem_with_id` now take `AsRef<Path>` instead of a byte array for the filename/id.
|
||||
|
@ -133,7 +133,7 @@ pub enum AsanError {
|
||||
}
|
||||
|
||||
pub struct AsanModuleBuilder {
|
||||
env: Option<Vec<(String, String)>>,
|
||||
env: Vec<(String, String)>,
|
||||
detect_leaks: bool,
|
||||
snapshot: bool,
|
||||
filter: StdAddressFilter,
|
||||
@ -234,7 +234,7 @@ impl Debug for AsanGiovese {
|
||||
impl AsanModuleBuilder {
|
||||
#[must_use]
|
||||
pub fn new(
|
||||
env: Option<Vec<(String, String)>>,
|
||||
env: Vec<(String, String)>,
|
||||
detect_leaks: bool,
|
||||
snapshot: bool,
|
||||
filter: StdAddressFilter,
|
||||
@ -252,7 +252,7 @@ impl AsanModuleBuilder {
|
||||
#[must_use]
|
||||
pub fn env(self, env: &[(String, String)]) -> Self {
|
||||
Self::new(
|
||||
Some(env.to_vec()),
|
||||
env.to_vec(),
|
||||
self.detect_leaks,
|
||||
self.snapshot,
|
||||
self.filter,
|
||||
@ -324,7 +324,7 @@ impl AsanModuleBuilder {
|
||||
#[must_use]
|
||||
pub fn build(self) -> AsanModule {
|
||||
AsanModule::new(
|
||||
self.env.unwrap().as_ref(),
|
||||
self.env.as_ref(),
|
||||
self.detect_leaks,
|
||||
self.snapshot,
|
||||
self.filter,
|
||||
@ -335,7 +335,11 @@ impl AsanModuleBuilder {
|
||||
|
||||
impl Default for AsanModuleBuilder {
|
||||
fn default() -> Self {
|
||||
Self::new(None, false, true, StdAddressFilter::default(), None)
|
||||
let env = env::vars()
|
||||
.filter(|(k, _v)| k != "LD_LIBRARY_PATH")
|
||||
.collect::<Vec<(String, String)>>();
|
||||
|
||||
Self::new(env, false, true, StdAddressFilter::default(), None)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user