Skip to content

Commit

Permalink
fix: Add no-san to the skipped targets in the msan build.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Jan 13, 2024
1 parent 6980e85 commit bb83cd2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion tools/built/src/Dockerfile.msan
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ RUN echo 'build --config=msan' >> .bazelrc.local

# Don't build any Go code. It needs sanitizer/msan_interface.h.
RUN sudo nix-daemon --daemon \
& bazel build -k --build_tag_filters='-go,-no-cross' //third_party/...
& bazel build -k --build_tag_filters='-go,-no-cross,-no-san' //third_party/...

# vim:ft=dockerfile
18 changes: 7 additions & 11 deletions tools/debug/symbolize
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,22 @@ SYMBOLIZER = (
"/nix/store/d0r6r274cpcr6gslqx16gn0m38qpy5p3-llvm-16.0.6/bin/llvm-symbolizer"
)

REGEX = r"\b0x[0-9a-f]{8,} \(([^ +]*)\+(0x[0-9a-f]+)\)"

for line in sys.stdin:
m = re.fullmatch(
"#(\d+) (0x[0-9a-f]+) \((.*)\+(0x[0-9a-f]+)\)( \(BuildId: [0-9a-f]+\))?",
line.strip(),
)
m = re.search(REGEX, line.strip())
if m:
num = m.group(1)
addr = m.group(2)
prog = m.group(3)
off = m.group(4)
buildid = m.group(5) or ""
prog = m.group(1)
off = m.group(2)

try:
fun = (subprocess.run(
[SYMBOLIZER, "--pretty-print", f"--exe={prog}", off],
check=True,
capture_output=True,
).stdout.decode("utf-8").split("\n")[0])
print(f" #{num} {fun}")
print(re.sub(REGEX, fun, line), end="")
except subprocess.CalledProcessError:
print(f" #{num} {addr} ({prog}+{off}){buildid}")
print(line, end="")
else:
print(line, end="")
2 changes: 1 addition & 1 deletion tools/toktok-fuzzer
Submodule toktok-fuzzer updated 351 files

0 comments on commit bb83cd2

Please sign in to comment.