Skip to content

Adding suppression file to the new vtr-flow.py #1480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion vtr_flow/scripts/python_libs/vtr/vpr/vpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
from collections import OrderedDict
from pathlib import Path
from os import environ
from vtr import (
find_vtr_file,
CommandRunner,
Expand Down Expand Up @@ -139,7 +140,7 @@ def run(
temp_dir=Path("."),
log_filename="vpr.out",
vpr_exec=None,
vpr_args=None,
vpr_args=None
):
"""
Runs VPR with the specified configuration
Expand Down Expand Up @@ -215,6 +216,17 @@ def run(
else:
cmd += ["--" + arg, str(value)]

#Extra options to fine-tune LeakSanitizer (LSAN) behaviour.
#Note that if VPR was compiled without LSAN these have no effect
# 'suppressions=...' Add the LeakSanitizer (LSAN) suppression file
# 'exitcode=12' Use a consistent exitcode
# (on some systems LSAN don't use the default exit code of 23)
# 'fast_unwind_on_malloc=0' Provide more accurate leak stack traces

environ["LSAN_OPTIONS"] = (
"suppressions={} exitcode=23 fast_unwind_on_malloc=0".format(find_vtr_file("lsan.supp"))
)

command_runner.run_system_command(
cmd, temp_dir=temp_dir, log_filename=log_filename, indent_depth=1
)
Expand Down