Skip to content

Conversation

cachemeifyoucan
Copy link
Collaborator

Fix a bug that when an alignment error can happen when reading a slice
of file from existing MappedFileRegionArena.

Created using spr 1.3.6
@cachemeifyoucan cachemeifyoucan merged commit dd56bec into main Sep 16, 2025
10 checks passed
@cachemeifyoucan cachemeifyoucan deleted the users/cachemeifyoucan/spr/cas-fix-alignment-error-from-mappedfileregionarena branch September 16, 2025 18:36
@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 16, 2025

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

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

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/build/llvm-project/compiler-rt/test/lit.common.cfg.py:248: warning: COMPILER_RT_TEST_STANDALONE_BUILD_LIBS=ON, but this test suite does not support testing the just-built runtime libraries when the test compiler is configured to use different runtime libraries. Either modify this test suite to support this test configuration, or set COMPILER_RT_TEST_STANDALONE_BUILD_LIBS=OFF to test the runtime libraries included in the compiler instead.
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:259: note: Testing using libraries in "/home/b/sanitizer-x86_64-linux/build/build_default/./lib/../lib/clang/22/lib/i386-unknown-linux-gnu"
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:237: warning: Compiler lib dir != compiler-rt lib dir
Compiler libdir:     "/home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/22/lib/i386-unknown-linux-gnu"
compiler-rt libdir:  "/home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/22/lib/x86_64-unknown-linux-gnu"
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:248: warning: COMPILER_RT_TEST_STANDALONE_BUILD_LIBS=ON, but this test suite does not support testing the just-built runtime libraries when the test compiler is configured to use different runtime libraries. Either modify this test suite to support this test configuration, or set COMPILER_RT_TEST_STANDALONE_BUILD_LIBS=OFF to test the runtime libraries included in the compiler instead.
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:259: note: Testing using libraries in "/home/b/sanitizer-x86_64-linux/build/build_default/./lib/../lib/clang/22/lib/x86_64-unknown-linux-gnu"
llvm-lit: /home/b/sanitizer-x86_64-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: 10410 tests, 64 workers --
Testing:  0.. 10.. 20.. 
FAIL: LeakSanitizer-AddressSanitizer-i386 :: TestCases/use_globals_uninitialized.cpp (3297 of 10410)
******************** TEST 'LeakSanitizer-AddressSanitizer-i386 :: TestCases/use_globals_uninitialized.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-x86_64-linux/build/build_default/./bin/clang  --driver-mode=g++ -O0  -m32  -gline-tables-only -fsanitize=address -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/../ /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/use_globals_uninitialized.cpp -o /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386AsanConfig/TestCases/Output/use_globals_uninitialized.cpp.tmp # RUN: at line 2
+ /home/b/sanitizer-x86_64-linux/build/build_default/./bin/clang --driver-mode=g++ -O0 -m32 -gline-tables-only -fsanitize=address -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/../ /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/use_globals_uninitialized.cpp -o /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386AsanConfig/TestCases/Output/use_globals_uninitialized.cpp.tmp
env LSAN_OPTIONS=:detect_leaks=1:"report_objects=1:use_stacks=0:use_registers=0:use_globals=0" not  /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386AsanConfig/TestCases/Output/use_globals_uninitialized.cpp.tmp 2>&1 | FileCheck /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/use_globals_uninitialized.cpp # RUN: at line 3
+ FileCheck /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/use_globals_uninitialized.cpp
+ env LSAN_OPTIONS=:detect_leaks=1:report_objects=1:use_stacks=0:use_registers=0:use_globals=0 not /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386AsanConfig/TestCases/Output/use_globals_uninitialized.cpp.tmp
/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/use_globals_uninitialized.cpp:20:11: error: CHECK: expected string not found in input
// CHECK: [[ADDR]] (1337 bytes)
          ^
<stdin>:4:55: note: scanning from here
==1745086==ERROR: LeakSanitizer: detected memory leaks
                                                      ^
<stdin>:4:55: note: with "ADDR" equal to "0xec703680"
==1745086==ERROR: LeakSanitizer: detected memory leaks
                                                      ^
<stdin>:19:10: note: possible intended match here
0xecd00700 (32 bytes)
         ^

Input file: <stdin>
Check file: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/use_globals_uninitialized.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: Test alloc: 0xec703680  
            2:  
            3: ================================================================= 
            4: ==1745086==ERROR: LeakSanitizer: detected memory leaks 
check:20'0                                                           X error: no match found
check:20'1                                                             with "ADDR" equal to "0xec703680"
            5:  
check:20'0     ~
Step 9 (test compiler-rt symbolizer) failure: test compiler-rt symbolizer (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:248: warning: COMPILER_RT_TEST_STANDALONE_BUILD_LIBS=ON, but this test suite does not support testing the just-built runtime libraries when the test compiler is configured to use different runtime libraries. Either modify this test suite to support this test configuration, or set COMPILER_RT_TEST_STANDALONE_BUILD_LIBS=OFF to test the runtime libraries included in the compiler instead.
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:259: note: Testing using libraries in "/home/b/sanitizer-x86_64-linux/build/build_default/./lib/../lib/clang/22/lib/i386-unknown-linux-gnu"
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:237: warning: Compiler lib dir != compiler-rt lib dir
Compiler libdir:     "/home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/22/lib/i386-unknown-linux-gnu"
compiler-rt libdir:  "/home/b/sanitizer-x86_64-linux/build/build_default/lib/clang/22/lib/x86_64-unknown-linux-gnu"
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:248: warning: COMPILER_RT_TEST_STANDALONE_BUILD_LIBS=ON, but this test suite does not support testing the just-built runtime libraries when the test compiler is configured to use different runtime libraries. Either modify this test suite to support this test configuration, or set COMPILER_RT_TEST_STANDALONE_BUILD_LIBS=OFF to test the runtime libraries included in the compiler instead.
llvm-lit: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lit.common.cfg.py:259: note: Testing using libraries in "/home/b/sanitizer-x86_64-linux/build/build_default/./lib/../lib/clang/22/lib/x86_64-unknown-linux-gnu"
llvm-lit: /home/b/sanitizer-x86_64-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: 10410 tests, 64 workers --
Testing:  0.. 10.. 20.. 
FAIL: LeakSanitizer-AddressSanitizer-i386 :: TestCases/use_globals_uninitialized.cpp (3297 of 10410)
******************** TEST 'LeakSanitizer-AddressSanitizer-i386 :: TestCases/use_globals_uninitialized.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-x86_64-linux/build/build_default/./bin/clang  --driver-mode=g++ -O0  -m32  -gline-tables-only -fsanitize=address -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/../ /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/use_globals_uninitialized.cpp -o /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386AsanConfig/TestCases/Output/use_globals_uninitialized.cpp.tmp # RUN: at line 2
+ /home/b/sanitizer-x86_64-linux/build/build_default/./bin/clang --driver-mode=g++ -O0 -m32 -gline-tables-only -fsanitize=address -I/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/../ /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/use_globals_uninitialized.cpp -o /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386AsanConfig/TestCases/Output/use_globals_uninitialized.cpp.tmp
env LSAN_OPTIONS=:detect_leaks=1:"report_objects=1:use_stacks=0:use_registers=0:use_globals=0" not  /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386AsanConfig/TestCases/Output/use_globals_uninitialized.cpp.tmp 2>&1 | FileCheck /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/use_globals_uninitialized.cpp # RUN: at line 3
+ FileCheck /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/use_globals_uninitialized.cpp
+ env LSAN_OPTIONS=:detect_leaks=1:report_objects=1:use_stacks=0:use_registers=0:use_globals=0 not /home/b/sanitizer-x86_64-linux/build/build_default/runtimes/runtimes-bins/compiler-rt/test/lsan/I386AsanConfig/TestCases/Output/use_globals_uninitialized.cpp.tmp
/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/use_globals_uninitialized.cpp:20:11: error: CHECK: expected string not found in input
// CHECK: [[ADDR]] (1337 bytes)
          ^
<stdin>:4:55: note: scanning from here
==1745086==ERROR: LeakSanitizer: detected memory leaks
                                                      ^
<stdin>:4:55: note: with "ADDR" equal to "0xec703680"
==1745086==ERROR: LeakSanitizer: detected memory leaks
                                                      ^
<stdin>:19:10: note: possible intended match here
0xecd00700 (32 bytes)
         ^

Input file: <stdin>
Check file: /home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/lsan/TestCases/use_globals_uninitialized.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: Test alloc: 0xec703680  
            2:  
            3: ================================================================= 
            4: ==1745086==ERROR: LeakSanitizer: detected memory leaks 
check:20'0                                                           X error: no match found
check:20'1                                                             with "ADDR" equal to "0xec703680"
            5:  
check:20'0     ~

@DavidSpickett
Copy link
Collaborator

That fixed it, re-enabled Arm in #159302.

You were right then, GCC must have emitted a more permissive instruction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants