[Lldb-commits] [lldb] [lldb][test] Avoid namespace name colliding with dyld symbols in TestAbiTagLookup (PR #203984)

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 16 02:07:52 PDT 2026


================
@@ -0,0 +1,45 @@
+"""
+Standalone reproducer for the lookup failure originally seen in
+TestAbiTagLookup.py on Apple platforms, where the dyld shared cache
+happens to expose two internal data symbols literally named `v1`.
+
+This test plants two unrelated internal data symbols named
+`colliding_ns` in non-debug-info objects, then evaluates a qualified-id
+expression that uses `colliding_ns` as a (real) namespace prefix.
+
+Expected eventual behavior: the namespace resolution succeeds and the
+function call returns 6.
+
+Current behavior (XFAIL): ClangExpressionDeclMap falls through to
+SymbolContext::FindBestGlobalDataSymbol which sees two internal
+`colliding_ns` data symbols and raises
+  "error: Multiple internal symbols found for 'colliding_ns'"
+even though the name has already been resolved to a NamespaceDecl
+earlier in the same lookup.
+"""
----------------
Teemperor wrote:

The "Current behaviour:" and the first paragraph ("Standalone reproducer") should IMHO be in the git commit but not as a source comment. We tend to forget removing these contemporary descriptions, and in a few years people get very confused when they see a comment that says "Lookup failure in AbiTagLookup" (that test might be named something very different in a few years)

https://github.com/llvm/llvm-project/pull/203984


More information about the lldb-commits mailing list