Skip to content

Commit 8dbedf4

Browse files
authored
[sanitizer] Allow *___lcxx_override symbolse in symbolizer (llvm#79904)
We don't intercept them, and they are not called and used only as markers anyway. These symbols introduced with llvm#69498.
1 parent 74bebee commit 8dbedf4

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,10 @@ $OPT -passes=internalize -internalize-public-api-list=${SYMBOLIZER_API_LIST} all
191191
$CC $FLAGS -fno-lto -c opt.bc -o symbolizer.o
192192

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

198200
cp -f symbolizer.o $OUTPUT

compiler-rt/lib/sanitizer_common/symbolizer/scripts/global_symbols.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# This file is used to control symbols used by internal symbolizer. We want to
2+
# avoid unexpected dependency on function intercepted by sanitizers.
3+
14
_GLOBAL_OFFSET_TABLE_ U
25
_ZN11__sanitizer13internal_mmapEPvjiiiy U
36
_ZN11__sanitizer13internal_mmapEPvmiiiy U
@@ -62,6 +65,8 @@ __sanitizer_symbolize_flush T
6265
__sanitizer_symbolize_frame T
6366
__sanitizer_symbolize_set_demangle T
6467
__sanitizer_symbolize_set_inline_frames T
68+
__start___lcxx_override U
69+
__stop___lcxx_override U
6570
__strdup U
6671
__udivdi3 U
6772
__umoddi3 U

0 commit comments

Comments
 (0)