Skip to content

[PowerPC] Only set QualName symbol on first section switch#179253

Merged
nikic merged 1 commit intollvm:mainfrom
nikic:ppc-aix-fix
Feb 4, 2026
Merged

[PowerPC] Only set QualName symbol on first section switch#179253
nikic merged 1 commit intollvm:mainfrom
nikic:ppc-aix-fix

Conversation

@nikic
Copy link
Contributor

@nikic nikic commented Feb 2, 2026

We were setting it every time when switching to the section. This caused problems when the debug_aranges emission performed a switch at the end of the section, resulting in symbols incorrectly pointing to the end instead of the start of the function.

We were setting it every time when switching to the section. This
caused problems when the debug_aranges emission performed a switch
at the end of the section, resulting in symbols incorrectly pointing
to the end instead of the start of the function.
@llvmbot
Copy link
Member

llvmbot commented Feb 2, 2026

@llvm/pr-subscribers-llvm-mc

@llvm/pr-subscribers-backend-powerpc

Author: Nikita Popov (nikic)

Changes

We were setting it every time when switching to the section. This caused problems when the debug_aranges emission performed a switch at the end of the section, resulting in symbols incorrectly pointing to the end instead of the start of the function.


Full diff: https://github.com/llvm/llvm-project/pull/179253.diff

2 Files Affected:

  • (modified) llvm/lib/MC/MCXCOFFStreamer.cpp (+6-2)
  • (added) llvm/test/CodeGen/PowerPC/aix-debug-aranges.ll (+28)
diff --git a/llvm/lib/MC/MCXCOFFStreamer.cpp b/llvm/lib/MC/MCXCOFFStreamer.cpp
index 4bf14c11068cb..b459b26045ae7 100644
--- a/llvm/lib/MC/MCXCOFFStreamer.cpp
+++ b/llvm/lib/MC/MCXCOFFStreamer.cpp
@@ -45,8 +45,12 @@ void MCXCOFFStreamer::changeSection(MCSection *Section, uint32_t Subsection) {
   // sections because we don't have other cases that hit this problem yet.
   // if (IsDwarfSec || CsectProp->MappingClass == XCOFF::XMC_PR)
   //   QualName->setFragment(F);
-  if (Sec->isDwarfSect() || Sec->getMappingClass() == XCOFF::XMC_PR)
-    Sec->getQualNameSymbol()->setFragment(CurFrag);
+  if (Sec->isDwarfSect() || Sec->getMappingClass() == XCOFF::XMC_PR) {
+    MCSymbol *QualNameSymbol = Sec->getQualNameSymbol();
+    // Only set the fragment the first time we're switching to the section.
+    if (!QualNameSymbol->isInSection())
+      QualNameSymbol->setFragment(CurFrag);
+  }
 }
 
 bool MCXCOFFStreamer::emitSymbolAttribute(MCSymbol *Sym,
diff --git a/llvm/test/CodeGen/PowerPC/aix-debug-aranges.ll b/llvm/test/CodeGen/PowerPC/aix-debug-aranges.ll
new file mode 100644
index 0000000000000..7b850b6f2a2d0
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/aix-debug-aranges.ll
@@ -0,0 +1,28 @@
+; RUN: llc -filetype=obj -function-sections -generate-arange-section < %s | \
+; RUN: llvm-objdump -dr - | FileCheck %s
+
+; Make sure that enabling debug_arange does not corrupt branches.
+
+target triple = "powerpc64-ibm-aix"
+
+define i64 @fn1() {
+; CHECK-LABEL: <.fn1>:
+; CHECK: bl {{.*}} <.fn2>
+; CHECK-NEXT: R_RBR .fn2
+  %1 = call i64 @fn2()
+  ret i64 %1
+}
+
+define i64 @fn2() !dbg !4 {
+  ret i64 0
+}
+
+!llvm.module.flags = !{!0}
+!llvm.dbg.cu = !{!1}
+
+!0 = !{i32 2, !"Debug Info Version", i32 3}
+!1 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !2, producer: "clang LLVM (rustc version 1.95.0-dev)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, globals: !3, splitDebugInlining: false, nameTableKind: None)
+!2 = !DIFile(filename: "foo", directory: "")
+!3 = !{}
+!4 = distinct !DISubprogram(name: "fn2", file: !2, line: 277, type: !5, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !1, templateParams: !3, retainedNodes: !3)
+!5 = !DISubroutineType(types: !3)

Copy link
Member

@amy-kwan amy-kwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this, appreciate it! LGTM.

@nikic nikic merged commit 90c632a into llvm:main Feb 4, 2026
13 checks passed
@nikic nikic deleted the ppc-aix-fix branch February 4, 2026 09:21
@nikic nikic added this to the LLVM 22.x Release milestone Feb 4, 2026
@nikic
Copy link
Contributor Author

nikic commented Feb 4, 2026

/cherry-pick 90c632a

@llvmbot
Copy link
Member

llvmbot commented Feb 4, 2026

/pull-request #179631

@llvm-ci
Copy link

llvm-ci commented Feb 4, 2026

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux running on sanitizer-buildbot7 while building llvm at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/31319

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[157/161] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.aarch64-with-call.o
[158/161] Generating Msan-aarch64-with-call-Test
[159/161] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.aarch64.o
[160/161] Generating Msan-aarch64-Test
[160/161] Running compiler_rt regression tests
llvm-lit: /home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/utils/lit/lit/discovery.py:273: warning: input '/home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/interception/Unit' contained no tests
llvm-lit: /home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/utils/lit/lit/discovery.py:273: warning: input '/home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/sanitizer_common/Unit' contained no tests
llvm-lit: /home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 5935 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90
FAIL: XRay-aarch64-linux :: TestCases/Posix/basic-filtering.cpp (5586 of 5935)
******************** TEST 'XRay-aarch64-linux :: TestCases/Posix/basic-filtering.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 4
/home/b/sanitizer-aarch64-linux/build/build_default/bin/clang  --driver-mode=g++ -fxray-instrument   -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta  -nobuiltininc -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/include -idirafter /home/b/sanitizer-aarch64-linux/build/build_default/lib/clang/23/include -resource-dir=/home/b/sanitizer-aarch64-linux/build/compiler_rt_build -Wl,-rpath,/home/b/sanitizer-aarch64-linux/build/compiler_rt_build/lib/linux   -std=c++11 /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/xray/TestCases/Posix/basic-filtering.cpp -o /home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/xray/AARCH64LinuxConfig/TestCases/Posix/Output/basic-filtering.cpp.tmp -g
# executed command: /home/b/sanitizer-aarch64-linux/build/build_default/bin/clang --driver-mode=g++ -fxray-instrument -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -nobuiltininc -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/include -idirafter /home/b/sanitizer-aarch64-linux/build/build_default/lib/clang/23/include -resource-dir=/home/b/sanitizer-aarch64-linux/build/compiler_rt_build -Wl,-rpath,/home/b/sanitizer-aarch64-linux/build/compiler_rt_build/lib/linux -std=c++11 /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/xray/TestCases/Posix/basic-filtering.cpp -o /home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/xray/AARCH64LinuxConfig/TestCases/Posix/Output/basic-filtering.cpp.tmp -g
# note: command had no output on stdout or stderr
# RUN: at line 5
rm -f basic-filtering-*
# executed command: rm -f 'basic-filtering-*'
# note: command had no output on stdout or stderr
# RUN: at line 6
env XRAY_OPTIONS="patch_premain=true xray_mode=xray-basic verbosity=1      xray_logfile_base=basic-filtering-      xray_naive_log_func_duration_threshold_us=1000      xray_naive_log_max_stack_depth=2"  /home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/xray/AARCH64LinuxConfig/TestCases/Posix/Output/basic-filtering.cpp.tmp 2>&1 |      FileCheck /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/xray/TestCases/Posix/basic-filtering.cpp
# executed command: env 'XRAY_OPTIONS=patch_premain=true xray_mode=xray-basic verbosity=1      xray_logfile_base=basic-filtering-      xray_naive_log_func_duration_threshold_us=1000      xray_naive_log_max_stack_depth=2' /home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/xray/AARCH64LinuxConfig/TestCases/Posix/Output/basic-filtering.cpp.tmp
# note: command had no output on stdout or stderr
# executed command: FileCheck /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/xray/TestCases/Posix/basic-filtering.cpp
# note: command had no output on stdout or stderr
# RUN: at line 11
ls basic-filtering-* | head -1 | tr -d '\n' > /home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/xray/AARCH64LinuxConfig/TestCases/Posix/Output/basic-filtering.cpp.tmp.log
# executed command: ls 'basic-filtering-*'
# note: command had no output on stdout or stderr
# executed command: head -1
# note: command had no output on stdout or stderr
# executed command: tr -d '\n'
# note: command had no output on stdout or stderr
# RUN: at line 12
/home/b/sanitizer-aarch64-linux/build/build_default/./bin/llvm-xray convert --symbolize --output-format=yaml -instr_map=/home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/xray/AARCH64LinuxConfig/TestCases/Posix/Output/basic-filtering.cpp.tmp      "/home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/xray/AARCH64LinuxConfig/TestCases/Posix/basic-filtering-basic-filtering.cpp.tmp.VUCSeg" |      FileCheck /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/xray/TestCases/Posix/basic-filtering.cpp --check-prefix TRACE
# executed command: /home/b/sanitizer-aarch64-linux/build/build_default/./bin/llvm-xray convert --symbolize --output-format=yaml -instr_map=/home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/xray/AARCH64LinuxConfig/TestCases/Posix/Output/basic-filtering.cpp.tmp '%{readfile:/home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/xray/AARCH64LinuxConfig/TestCases/Posix/Output/basic-filtering.cpp.tmp.log}'
# note: command had no output on stdout or stderr
# executed command: FileCheck /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/xray/TestCases/Posix/basic-filtering.cpp --check-prefix TRACE
# .---command stderr------------
# | /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/xray/TestCases/Posix/basic-filtering.cpp:61:15: error: TRACE-NOT: excluded string found in input
# | // TRACE-NOT: - { type: 0, func-id: {{.*}}, function: {{.*filtered.*}}, {{.*}} }
# |               ^
# | <stdin>:10:2: note: found here
# |  - { type: 0, func-id: 1, function: 'filtered()', cpu: 0, thread: 1690362, process: 1690362, kind: function-enter, tsc: 1770198223916956317, data: '' }
Step 16 (test standalone compiler-rt) failure: test standalone compiler-rt (failure)
...
[157/161] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.aarch64-with-call.o
[158/161] Generating Msan-aarch64-with-call-Test
[159/161] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.aarch64.o
[160/161] Generating Msan-aarch64-Test
[160/161] Running compiler_rt regression tests
llvm-lit: /home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/utils/lit/lit/discovery.py:273: warning: input '/home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/interception/Unit' contained no tests
llvm-lit: /home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/utils/lit/lit/discovery.py:273: warning: input '/home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/sanitizer_common/Unit' contained no tests
llvm-lit: /home/b/sanitizer-aarch64-linux/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 5935 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90
FAIL: XRay-aarch64-linux :: TestCases/Posix/basic-filtering.cpp (5586 of 5935)
******************** TEST 'XRay-aarch64-linux :: TestCases/Posix/basic-filtering.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 4
/home/b/sanitizer-aarch64-linux/build/build_default/bin/clang  --driver-mode=g++ -fxray-instrument   -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta  -nobuiltininc -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/include -idirafter /home/b/sanitizer-aarch64-linux/build/build_default/lib/clang/23/include -resource-dir=/home/b/sanitizer-aarch64-linux/build/compiler_rt_build -Wl,-rpath,/home/b/sanitizer-aarch64-linux/build/compiler_rt_build/lib/linux   -std=c++11 /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/xray/TestCases/Posix/basic-filtering.cpp -o /home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/xray/AARCH64LinuxConfig/TestCases/Posix/Output/basic-filtering.cpp.tmp -g
# executed command: /home/b/sanitizer-aarch64-linux/build/build_default/bin/clang --driver-mode=g++ -fxray-instrument -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -nobuiltininc -I/home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/include -idirafter /home/b/sanitizer-aarch64-linux/build/build_default/lib/clang/23/include -resource-dir=/home/b/sanitizer-aarch64-linux/build/compiler_rt_build -Wl,-rpath,/home/b/sanitizer-aarch64-linux/build/compiler_rt_build/lib/linux -std=c++11 /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/xray/TestCases/Posix/basic-filtering.cpp -o /home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/xray/AARCH64LinuxConfig/TestCases/Posix/Output/basic-filtering.cpp.tmp -g
# note: command had no output on stdout or stderr
# RUN: at line 5
rm -f basic-filtering-*
# executed command: rm -f 'basic-filtering-*'
# note: command had no output on stdout or stderr
# RUN: at line 6
env XRAY_OPTIONS="patch_premain=true xray_mode=xray-basic verbosity=1      xray_logfile_base=basic-filtering-      xray_naive_log_func_duration_threshold_us=1000      xray_naive_log_max_stack_depth=2"  /home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/xray/AARCH64LinuxConfig/TestCases/Posix/Output/basic-filtering.cpp.tmp 2>&1 |      FileCheck /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/xray/TestCases/Posix/basic-filtering.cpp
# executed command: env 'XRAY_OPTIONS=patch_premain=true xray_mode=xray-basic verbosity=1      xray_logfile_base=basic-filtering-      xray_naive_log_func_duration_threshold_us=1000      xray_naive_log_max_stack_depth=2' /home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/xray/AARCH64LinuxConfig/TestCases/Posix/Output/basic-filtering.cpp.tmp
# note: command had no output on stdout or stderr
# executed command: FileCheck /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/xray/TestCases/Posix/basic-filtering.cpp
# note: command had no output on stdout or stderr
# RUN: at line 11
ls basic-filtering-* | head -1 | tr -d '\n' > /home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/xray/AARCH64LinuxConfig/TestCases/Posix/Output/basic-filtering.cpp.tmp.log
# executed command: ls 'basic-filtering-*'
# note: command had no output on stdout or stderr
# executed command: head -1
# note: command had no output on stdout or stderr
# executed command: tr -d '\n'
# note: command had no output on stdout or stderr
# RUN: at line 12
/home/b/sanitizer-aarch64-linux/build/build_default/./bin/llvm-xray convert --symbolize --output-format=yaml -instr_map=/home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/xray/AARCH64LinuxConfig/TestCases/Posix/Output/basic-filtering.cpp.tmp      "/home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/xray/AARCH64LinuxConfig/TestCases/Posix/basic-filtering-basic-filtering.cpp.tmp.VUCSeg" |      FileCheck /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/xray/TestCases/Posix/basic-filtering.cpp --check-prefix TRACE
# executed command: /home/b/sanitizer-aarch64-linux/build/build_default/./bin/llvm-xray convert --symbolize --output-format=yaml -instr_map=/home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/xray/AARCH64LinuxConfig/TestCases/Posix/Output/basic-filtering.cpp.tmp '%{readfile:/home/b/sanitizer-aarch64-linux/build/compiler_rt_build/test/xray/AARCH64LinuxConfig/TestCases/Posix/Output/basic-filtering.cpp.tmp.log}'
# note: command had no output on stdout or stderr
# executed command: FileCheck /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/xray/TestCases/Posix/basic-filtering.cpp --check-prefix TRACE
# .---command stderr------------
# | /home/b/sanitizer-aarch64-linux/build/llvm-project/compiler-rt/test/xray/TestCases/Posix/basic-filtering.cpp:61:15: error: TRACE-NOT: excluded string found in input
# | // TRACE-NOT: - { type: 0, func-id: {{.*}}, function: {{.*filtered.*}}, {{.*}} }
# |               ^
# | <stdin>:10:2: note: found here
# |  - { type: 0, func-id: 1, function: 'filtered()', cpu: 0, thread: 1690362, process: 1690362, kind: function-enter, tsc: 1770198223916956317, data: '' }

@llvm-ci
Copy link

llvm-ci commented Feb 4, 2026

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-fast running on sanitizer-buildbot3 while building llvm at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/169/builds/19612

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:561: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:561: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:561: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:561: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:561: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:561: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:561: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 95885 tests, 64 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 
FAIL: LLVM :: ExecutionEngine/JITLink/x86-64/MachO_linker_private_symbols.s (54720 of 95885)
******************** TEST 'LLVM :: ExecutionEngine/JITLink/x86-64/MachO_linker_private_symbols.s' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
rm -rf /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp && mkdir -p /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp
# executed command: rm -rf /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp
# note: command had no output on stdout or stderr
# executed command: mkdir -p /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp
# note: command had no output on stdout or stderr
# RUN: at line 2
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj    -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/global_lp_def.o /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/Inputs/MachO_global_linker_private_def.s
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/global_lp_def.o /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/Inputs/MachO_global_linker_private_def.s
# note: command had no output on stdout or stderr
# RUN: at line 4
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj    -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/internal_lp_def.o /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/Inputs/MachO_internal_linker_private_def.s
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/internal_lp_def.o /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/Inputs/MachO_internal_linker_private_def.s
# note: command had no output on stdout or stderr
# RUN: at line 6
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj    -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/macho_lp_test.o /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/MachO_linker_private_symbols.s
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/macho_lp_test.o /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/MachO_linker_private_symbols.s
# note: command had no output on stdout or stderr
# RUN: at line 8
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-jitlink -noexec /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/global_lp_def.o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/macho_lp_test.o
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-jitlink -noexec /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/global_lp_def.o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/macho_lp_test.o
# note: command had no output on stdout or stderr
# RUN: at line 9
not /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-jitlink -noexec /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/internal_lp_def.o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/macho_lp_test.o
# executed command: not /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-jitlink -noexec /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/internal_lp_def.o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/macho_lp_test.o
# .---command stderr------------
# | llvm-jitlink error: Symbols not found: [ l_foo ]
# | libc++abi: Pure virtual function called!
# `-----------------------------
# error: command failed with exit status: 1

--

Step 10 (stage2/asan_ubsan check) failure: stage2/asan_ubsan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:561: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:561: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:561: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:561: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:561: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:561: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:561: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 95885 tests, 64 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 
FAIL: LLVM :: ExecutionEngine/JITLink/x86-64/MachO_linker_private_symbols.s (54720 of 95885)
******************** TEST 'LLVM :: ExecutionEngine/JITLink/x86-64/MachO_linker_private_symbols.s' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
rm -rf /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp && mkdir -p /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp
# executed command: rm -rf /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp
# note: command had no output on stdout or stderr
# executed command: mkdir -p /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp
# note: command had no output on stdout or stderr
# RUN: at line 2
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj    -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/global_lp_def.o /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/Inputs/MachO_global_linker_private_def.s
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/global_lp_def.o /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/Inputs/MachO_global_linker_private_def.s
# note: command had no output on stdout or stderr
# RUN: at line 4
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj    -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/internal_lp_def.o /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/Inputs/MachO_internal_linker_private_def.s
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/internal_lp_def.o /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/Inputs/MachO_internal_linker_private_def.s
# note: command had no output on stdout or stderr
# RUN: at line 6
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj    -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/macho_lp_test.o /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/MachO_linker_private_symbols.s
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/macho_lp_test.o /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/MachO_linker_private_symbols.s
# note: command had no output on stdout or stderr
# RUN: at line 8
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-jitlink -noexec /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/global_lp_def.o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/macho_lp_test.o
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-jitlink -noexec /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/global_lp_def.o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/macho_lp_test.o
# note: command had no output on stdout or stderr
# RUN: at line 9
not /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-jitlink -noexec /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/internal_lp_def.o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/macho_lp_test.o
# executed command: not /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-jitlink -noexec /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/internal_lp_def.o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_linker_private_symbols.s.tmp/macho_lp_test.o
# .---command stderr------------
# | llvm-jitlink error: Symbols not found: [ l_foo ]
# | libc++abi: Pure virtual function called!
# `-----------------------------
# error: command failed with exit status: 1

--


rishabhmadan19 pushed a commit to rishabhmadan19/llvm-project that referenced this pull request Feb 9, 2026
We were setting it every time when switching to the section. This caused
problems when the debug_aranges emission performed a switch at the end
of the section, resulting in symbols incorrectly pointing to the end
instead of the start of the function.
nikic added a commit to rust-lang/llvm-project that referenced this pull request Feb 10, 2026
We were setting it every time when switching to the section. This caused
problems when the debug_aranges emission performed a switch at the end
of the section, resulting in symbols incorrectly pointing to the end
instead of the start of the function.

(cherry picked from commit 90c632a)
c-rhodes pushed a commit to llvmbot/llvm-project that referenced this pull request Feb 20, 2026
We were setting it every time when switching to the section. This caused
problems when the debug_aranges emission performed a switch at the end
of the section, resulting in symbols incorrectly pointing to the end
instead of the start of the function.

(cherry picked from commit 90c632a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend:PowerPC llvm:mc Machine (object) code

Projects

Development

Successfully merging this pull request may close these issues.

4 participants