parent
16a2c2925e
commit
6332a3af21
1 changed files with 9 additions and 2 deletions
11
.github/workflows/safety.yml
vendored
11
.github/workflows/safety.yml
vendored
|
|
@ -23,8 +23,15 @@ jobs:
|
||||||
sudo apt install llvm
|
sudo apt install llvm
|
||||||
# to fix buggy leak analyzer:
|
# to fix buggy leak analyzer:
|
||||||
# https://github.com/japaric/rust-san#unrealiable-leaksanitizer
|
# https://github.com/japaric/rust-san#unrealiable-leaksanitizer
|
||||||
sed -i '/\[features\]/i [profile.dev]' Cargo.toml
|
# ensure there's a profile.dev section
|
||||||
sed -i '/profile.dev/a opt-level = 1' Cargo.toml
|
if ! grep -qE '^[ \t]*[profile.dev]' Cargo.toml; then
|
||||||
|
echo >> Cargo.toml
|
||||||
|
echo '[profile.dev]' >> Cargo.toml
|
||||||
|
fi
|
||||||
|
# remove pre-existing opt-levels in profile.dev
|
||||||
|
sed -i '/^\s*\[profile.dev\]/,/^\s*\[/ {/^\s*opt-level/d}' Cargo.toml
|
||||||
|
# now set opt-level to 1
|
||||||
|
sed -i '/^\s*\[profile.dev\]/a opt-level = 1' Cargo.toml
|
||||||
cat Cargo.toml
|
cat Cargo.toml
|
||||||
name: Enable debug symbols
|
name: Enable debug symbols
|
||||||
- name: cargo test -Zsanitizer=address
|
- name: cargo test -Zsanitizer=address
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue