[sanitizer] Allow *___lcxx_override symbolse in symbolizer#79904
Merged
vitalybuka merged 1 commit intomainfrom Jan 29, 2024
Merged
Conversation
Created using spr 1.3.4
Member
|
@llvm/pr-subscribers-compiler-rt-sanitizer Author: Vitaly Buka (vitalybuka) ChangesWe don't intercept them, and they are not called and used only as Full diff: https://github.com/llvm/llvm-project/pull/79904.diff 2 Files Affected:
diff --git a/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh b/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
index f24d42cc84e4176..7f4082a6cd190e2 100755
--- a/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
+++ b/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
@@ -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
diff --git a/compiler-rt/lib/sanitizer_common/symbolizer/scripts/global_symbols.txt b/compiler-rt/lib/sanitizer_common/symbolizer/scripts/global_symbols.txt
index 0a4bc6989a0d72a..ef522976a2c2da3 100644
--- a/compiler-rt/lib/sanitizer_common/symbolizer/scripts/global_symbols.txt
+++ b/compiler-rt/lib/sanitizer_common/symbolizer/scripts/global_symbols.txt
@@ -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
@@ -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
|
Collaborator
Author
|
Please don't merge yet, testing And I don't know why bots are inconsistent, I would expect that all fail without this patch. |
Contributor
|
@kstoimenov (build watch): FYI: these symbols appear in the alternating buildbot failures |
thurstond
approved these changes
Jan 29, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We don't intercept them, and they are not called and used only as
markers anyway.
These symbols introduced with #69498.