Skip to content

Conversation

grigorypas
Copy link
Contributor

@grigorypas grigorypas commented Aug 18, 2025

The original test crashed with segmentation fault:

perf_test.test.script: line 8: 1470352 Segmentation fault (core dumped) perf record -Fmax -e cycles:u -o /home/gpastukhov/llvm-build-release/tools/bolt/test/perf2bolt/Output/perf_test.test.tmp2 -- /home/gpastukhov/llvm-build-release/tools/bolt/test/perf2bolt/Output/perf_test.test.tmp

The crash happens if the compiler set up not to build PIE by default, however the test expects PIE.

@llvmbot
Copy link
Member

llvmbot commented Aug 18, 2025

@llvm/pr-subscribers-bolt

Author: Grigory Pastukhov (grigorypas)

Changes

The original test crashed with segmentation fault:

perf_test.test.script: line 8: 1470352 Segmentation fault (core dumped) perf record -Fmax -e cycles:u -o /home/gpastukhov/llvm-build-release/tools/bolt/test/perf2bolt/Output/perf_test.test.tmp2 -- /home/gpastukhov/llvm-build-release/tools/bolt/test/perf2bolt/Output/perf_test.test.tmp


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

1 Files Affected:

  • (modified) bolt/test/perf2bolt/Inputs/perf_test.lds (+5-6)
diff --git a/bolt/test/perf2bolt/Inputs/perf_test.lds b/bolt/test/perf2bolt/Inputs/perf_test.lds
index 66d925a05bebc..c2704d73a638c 100644
--- a/bolt/test/perf2bolt/Inputs/perf_test.lds
+++ b/bolt/test/perf2bolt/Inputs/perf_test.lds
@@ -1,13 +1,12 @@
 SECTIONS {
-  . = SIZEOF_HEADERS;
+  . = 0x400000 + SIZEOF_HEADERS;
   .interp : { *(.interp) }
   .note.gnu.build-id : { *(.note.gnu.build-id) }
-  . = 0x212e8;
   .dynsym         : { *(.dynsym) }
-  . = 0x31860;
+  . = 0x801000;
   .text : { *(.text*) }
-  . = 0x41c20;
+  . = 0x803000;
   .fini_array : { *(.fini_array) }
-  . = 0x54e18;
+  . = 0x805000;
   .data : { *(.data) }
-}
\ No newline at end of file
+}

@maksfb
Copy link
Contributor

maksfb commented Aug 19, 2025

Thanks!

@ayermolo ayermolo merged commit d12829d into llvm:main Aug 25, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants