Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

13.0.0-rc3 regression: GWP-ASan-i386 :: backtrace.c failure (segv?) #51189

Closed
llvmbot opened this issue Sep 14, 2021 · 3 comments
Closed

13.0.0-rc3 regression: GWP-ASan-i386 :: backtrace.c failure (segv?) #51189

llvmbot opened this issue Sep 14, 2021 · 3 comments
Labels
bugzilla Issues migrated from bugzilla

Comments

@llvmbot
Copy link
Member

llvmbot commented Sep 14, 2021

Bugzilla Link 51847
Resolution FIXED
Resolved on Sep 17, 2021 16:41
Version trunk
OS Linux
Blocks #50580
Reporter LLVM Bugzilla Contributor
CC @tstellar
Fixed by commit(s) 210d72e d811546

Extended Description

I'm getting the following test failure with 13.0.0-rc3. I've just tested and the same test is passing with rc2.

FAIL: GWP-ASan-i386 :: backtrace.c (2850 of 8284)
******************** TEST 'GWP-ASan-i386 :: backtrace.c' FAILED ********************
Script:

: 'RUN: at line 2'; /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/lib/llvm/13/bin/clang -m32 -rdynamic -pthread -Wl,--whole-archive /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/lib/clang/13.0.0/lib/linux/libclang_rt.scudo_standalone-i386.a -Wl,--no-whole-archive -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt/test/gwp_asan/backtrace.c -g -o /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/test/gwp_asan/I386LinuxConfig/Output/backtrace.c.tmp
: 'RUN: at line 3'; not --crash /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/test/gwp_asan/I386LinuxConfig/Output/backtrace.c.tmp 2>&1 | FileCheck /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt/test/gwp_asan/backtrace.c
: 'RUN: at line 7'; /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/lib/llvm/13/bin/clang -m32 -rdynamic -pthread -Wl,--whole-archive /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/lib/clang/13.0.0/lib/linux/libclang_rt.scudo_standalone-i386.a -Wl,--no-whole-archive -fomit-frame-pointer -momit-leaf-frame-pointer /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt/test/gwp_asan/backtrace.c -g -o /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/test/gwp_asan/I386LinuxConfig/Output/backtrace.c.tmp
: 'RUN: at line 8'; not --crash /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/test/gwp_asan/I386LinuxConfig/Output/backtrace.c.tmp

Exit Code: 1

Command Output (stderr):

  • : 'RUN: at line 2'
  • /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/lib/llvm/13/bin/clang -m32 -rdynamic -pthread -Wl,--whole-archive /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/lib/clang/13.0.0/lib/linux/libclang_rt.scudo_standalone-i386.a -Wl,--no-whole-archive -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt/test/gwp_asan/backtrace.c -g -o /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/test/gwp_asan/I386LinuxConfig/Output/backtrace.c.tmp
  • : 'RUN: at line 3'
  • not --crash /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/test/gwp_asan/I386LinuxConfig/Output/backtrace.c.tmp
  • FileCheck /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt/test/gwp_asan/backtrace.c
    /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt/test/gwp_asan/backtrace.c:26:11: error: CHECK: expected string not found in input
    // CHECK: free_mem
    ^
    :10:27: note: scanning from here
    0xf7f52000 was deallocated by thread 345976 here:
    ^
    :25:6: note: possible intended match here
    error: Segmentation fault (core dumped)
    ^

Input file:
Check file: /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt/test/gwp_asan/backtrace.c

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

Input was:
<<<<<<
.
.
.
5: #​2 linux-gate.so.1(__kernel_rt_sigreturn+0) [0xf7f78570]
6: #​3 /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/test/gwp_asan/I386LinuxConfig/Output/backtrace.c.tmp(touch_mem+0xa) [0x805379a]
7: #​4 /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/test/gwp_asan/I386LinuxConfig/Output/backtrace.c.tmp(main+0x3f) [0x80537ef]
8: #​5 /lib/libc.so.6(__libc_start_main+0xe5) [0xf7d31925]
9:
10: 0xf7f52000 was deallocated by thread 345976 here:
check:26'0 X~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
11: #​0 /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/test/gwp_asan/I386LinuxConfig/Output/backtrace.c.tmp() [0x804ae4f]
check:26'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12: #​1 /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/test/gwp_asan/I386LinuxConfig/Output/backtrace.c.tmp() [0x80494dd]
check:26'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13: #​2 /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/test/gwp_asan/I386LinuxConfig/Output/backtrace.c.tmp() [0x804aa18]
check:26'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14: #​3 /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/test/gwp_asan/I386LinuxConfig/Output/backtrace.c.tmp() [0x804eb0a]
check:26'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15: #​4 /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/test/gwp_asan/I386LinuxConfig/Output/backtrace.c.tmp(main+0x34) [0x80537e4]
check:26'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.
.
.
20: #​1 /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/test/gwp_asan/I386LinuxConfig/Output/backtrace.c.tmp() [0x80494dd]
check:26'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21: #​2 /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/test/gwp_asan/I386LinuxConfig/Output/backtrace.c.tmp() [0x804a7a4]
check:26'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22: #​3 /var/tmp/portage/sys-libs/compiler-rt-sanitizers-13.0.0_rc3/work/compiler-rt_build/test/gwp_asan/I386LinuxConfig/Output/backtrace.c.tmp() [0x804e8d9]
check:26'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23:
check:26'0 ~
24: *** End GWP-ASan report ***
check:26'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25: error: Segmentation fault (core dumped)
check:26'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:26'1 ? possible intended match

--


@llvmbot
Copy link
Member Author

llvmbot commented Sep 14, 2021

git bisect says that the following commit is to blame:

commit 9ee64c3
Author: Tom Stellard tstellar@redhat.com
Date: Wed Sep 8 21:10:38 2021 -0700

scudo: Only add no-omit-frame-pointer flags when the compiler supports them

Reviewed By: cryptoad

Differential Revision: https://reviews.llvm.org/D109196

compiler-rt/lib/scudo/standalone/CMakeLists.txt | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

It's a tad late but my first guess would be that COMPILER_RT_HAS_OMIT_FRAME_POINTER_FLAG is only defined when building buildins, and since we're doing split packages this one has -DCOMPILER_RT_BUILD_BUILTINS=OFF.

@llvmbot
Copy link
Member Author

llvmbot commented Sep 15, 2021

Submitted https://reviews.llvm.org/D109812 with a (tested) fix.

@tstellar
Copy link
Collaborator

Merged: d811546

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

2 participants