Skip to content

Commit

Permalink
[sanitizer] Allow *___lcxx_override symbolse in symbolizer (#79904)
Browse files Browse the repository at this point in the history
We don't intercept them, and they are not called and used only as
markers anyway.

These symbols introduced with #69498.
  • Loading branch information
vitalybuka authored Jan 29, 2024
1 parent 74bebee commit 8dbedf4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,10 @@ $OPT -passes=internalize -internalize-public-api-list=${SYMBOLIZER_API_LIST} all
$CC $FLAGS -fno-lto -c opt.bc -o symbolizer.o

echo "Checking undefined symbols..."
nm -f posix -g symbolizer.o | cut -f 1,2 -d \ | LC_COLLATE=C sort -u > undefined.new
(diff -u $SCRIPT_DIR/global_symbols.txt undefined.new | grep -E "^\+[^+]") && \
export LC_ALL=C
nm -f posix -g symbolizer.o | cut -f 1,2 -d \ | sort -u > undefined.new
grep -Ev "^#|^$" $SCRIPT_DIR/global_symbols.txt | sort -u > expected.new
(diff -u expected.new undefined.new | grep -E "^\+[^+]") && \
(echo "Failed: unexpected symbols"; exit 1)

cp -f symbolizer.o $OUTPUT
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file is used to control symbols used by internal symbolizer. We want to
# avoid unexpected dependency on function intercepted by sanitizers.

_GLOBAL_OFFSET_TABLE_ U
_ZN11__sanitizer13internal_mmapEPvjiiiy U
_ZN11__sanitizer13internal_mmapEPvmiiiy U
Expand Down Expand Up @@ -62,6 +65,8 @@ __sanitizer_symbolize_flush T
__sanitizer_symbolize_frame T
__sanitizer_symbolize_set_demangle T
__sanitizer_symbolize_set_inline_frames T
__start___lcxx_override U
__stop___lcxx_override U
__strdup U
__udivdi3 U
__umoddi3 U
Expand Down

0 comments on commit 8dbedf4

Please sign in to comment.