[PATCH] D20425: [sanitizer] Don't use -fomit-frame-pointer in COMPILER_RT_DEBUG=On builds
Filipe Cabecinhas via llvm-commits
llvm-commits at lists.llvm.org
Wed May 25 04:15:00 PDT 2016
> What is your OS X version?
[llvm-cmake]% sw_vers
ProductName: Mac OS X
ProductVersion: 10.11.5
BuildVersion: 15F34
> What is your CMake configure line?
That has been lost in time. But I usually just add all the dirs for
clang, libcxx, etc. C*FLAGS aren't special, I just set the build mode
to Debug or Release.
> What is the output of:
> - `otool -L /Users/filcab/work/llvm-cmake/lib/clang/3.9.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib`
> - `otool -l /Users/filcab/work/llvm-cmake/lib/clang/3.9.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib`
> - `otool -L /Users/filcab/work/llvm-cmake/projects/compiler-rt/test/asan/X86_64DarwinConfig/TestCases/Output/malloc_context_size.cc.tmp`
> - `otool -l /Users/filcab/work/llvm-cmake/projects/compiler-rt/test/asan/X86_64DarwinConfig/TestCases/Output/malloc_context_size.cc.tmp`
Attaching a text file.
Thank you,
Filipe
BTW, there's also problems with at least one TSan test, in debug
builds (but this one I think I only see it at home (same rough
config)):
******************** TEST 'ThreadSanitizer-x86_64h :: mutexset7.cc'
FAILED ********************
Script:
--
/Users/filcab/dev/llvm/build-debug/./bin/clang --driver-mode=g++
-fsanitize=thread -Wall -arch x86_64h -gline-tables-only -O1
/Users/filcab/dev/llvm/compiler-rt/test/tsan/mutexset7.cc -o
/Users/filcab/dev/llvm/build-debug/projects/compiler-rt/test/tsan/X86_64HConfig/Output/mutexset7.cc.tmp
&& /Users/filcab/dev/llvm/llvm/projects/compiler-rt/test/tsan/deflake.bash
/Users/filcab/dev/llvm/build-debug/projects/compiler-rt/test/tsan/X86_64HConfig/Output/mutexset7.cc.tmp
| FileCheck /Users/filcab/dev/llvm/compiler-rt/test/tsan/mutexset7.cc
--
Exit Code: 1
Command Output (stderr):
--
ld: section __DATA/__thread_bss extends beyond end of file, file
'/var/folders/9c/8tdsmzsd2cn_c6wkqjbbnd_m0000gn/T/mutexset7-6dfa74.o'
for architecture x86_64h
clang-3.8: error: linker command failed with exit code 1 (use -v to
see invocation)
On Tue, May 24, 2016 at 10:03 PM, Kuba Brecka <kuba.brecka at gmail.com> wrote:
> kubabrecka added a comment.
>
> In http://reviews.llvm.org/D20425#437770, @filcab wrote:
>
>> ...
>> large_func_test.cc has a similar failure, but it's trying to match
>> .*_Zna.* and gets wrap_malloc.
>
>
> Okay, this is completely unrelated to this patch. LLVM-Symbolizer doesn't have issues with missing frame pointers.
>
> What is your OS X version? What is your CMake configure line? What is the output of:
>
> - `otool -L /Users/filcab/work/llvm-cmake/lib/clang/3.9.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib`
> - `otool -l /Users/filcab/work/llvm-cmake/lib/clang/3.9.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib`
> - `otool -L /Users/filcab/work/llvm-cmake/projects/compiler-rt/test/asan/X86_64DarwinConfig/TestCases/Output/malloc_context_size.cc.tmp`
> - `otool -l /Users/filcab/work/llvm-cmake/projects/compiler-rt/test/asan/X86_64DarwinConfig/TestCases/Output/malloc_context_size.cc.tmp`
>
> ?
>
>
> Repository:
> rL LLVM
>
> http://reviews.llvm.org/D20425
>
>
>
-------------- next part --------------
[~]% otool -L /Users/filcab/work/llvm-cmake/lib/clang/3.9.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
/Users/filcab/work/llvm-cmake/lib/clang/3.9.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib:
@rpath/libclang_rt.asan_osx_dynamic.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libc++abi.dylib (compatibility version 1.0.0, current version 125.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
[~]% otool -l /Users/filcab/work/llvm-cmake/lib/clang/3.9.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
/Users/filcab/work/llvm-cmake/lib/clang/3.9.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib:
Load command 0
cmd LC_SEGMENT_64
cmdsize 712
segname __TEXT
vmaddr 0x0000000000000000
vmsize 0x000000000008b000
fileoff 0
filesize 569344
maxprot 0x00000007
initprot 0x00000005
nsects 8
flags 0x0
Section
sectname __text
segname __TEXT
addr 0x00000000000021d0
size 0x0000000000074580
offset 8656
align 2^4 (16)
reloff 0
nreloc 0
flags 0x80000400
reserved1 0
reserved2 0
Section
sectname __stubs
segname __TEXT
addr 0x0000000000076750
size 0x0000000000000678
offset 485200
align 2^1 (2)
reloff 0
nreloc 0
flags 0x80000408
reserved1 0 (index into indirect symbol table)
reserved2 6 (size of stubs)
Section
sectname __stub_helper
segname __TEXT
addr 0x0000000000076dc8
size 0x0000000000000a92
offset 486856
align 2^2 (4)
reloff 0
nreloc 0
flags 0x80000400
reserved1 0
reserved2 0
Section
sectname __cstring
segname __TEXT
addr 0x0000000000077860
size 0x000000000000be2a
offset 489568
align 2^4 (16)
reloff 0
nreloc 0
flags 0x00000002
reserved1 0
reserved2 0
Section
sectname __const
segname __TEXT
addr 0x0000000000083690
size 0x0000000000000342
offset 538256
align 2^4 (16)
reloff 0
nreloc 0
flags 0x00000000
reserved1 0
reserved2 0
Section
sectname __os_trace
segname __TEXT
addr 0x00000000000839e0
size 0x00000000000000f5
offset 539104
align 2^4 (16)
reloff 0
nreloc 0
flags 0x00000000
reserved1 0
reserved2 0
Section
sectname __unwind_info
segname __TEXT
addr 0x0000000000083ad8
size 0x00000000000021e4
offset 539352
align 2^2 (4)
reloff 0
nreloc 0
flags 0x00000000
reserved1 0
reserved2 0
Section
sectname __eh_frame
segname __TEXT
addr 0x0000000000085cc0
size 0x0000000000005340
offset 548032
align 2^3 (8)
reloff 0
nreloc 0
flags 0x00000000
reserved1 0
reserved2 0
Load command 1
cmd LC_SEGMENT_64
cmdsize 792
segname __DATA
vmaddr 0x000000000008b000
vmsize 0x0000000000d36000
fileoff 569344
filesize 20480
maxprot 0x00000007
initprot 0x00000003
nsects 9
flags 0x0
Section
sectname __got
segname __DATA
addr 0x000000000008b000
size 0x0000000000000050
offset 569344
align 2^3 (8)
reloff 0
nreloc 0
flags 0x00000006
reserved1 276 (index into indirect symbol table)
reserved2 0
Section
sectname __nl_symbol_ptr
segname __DATA
addr 0x000000000008b050
size 0x0000000000000010
offset 569424
align 2^3 (8)
reloff 0
nreloc 0
flags 0x00000006
reserved1 286 (index into indirect symbol table)
reserved2 0
Section
sectname __la_symbol_ptr
segname __DATA
addr 0x000000000008b060
size 0x00000000000008a0
offset 569440
align 2^3 (8)
reloff 0
nreloc 0
flags 0x00000007
reserved1 288 (index into indirect symbol table)
reserved2 0
Section
sectname __mod_init_func
segname __DATA
addr 0x000000000008b900
size 0x0000000000000010
offset 571648
align 2^3 (8)
reloff 0
nreloc 0
flags 0x00000009
reserved1 0
reserved2 0
Section
sectname __const
segname __DATA
addr 0x000000000008b910
size 0x0000000000000450
offset 571664
align 2^4 (16)
reloff 0
nreloc 0
flags 0x00000000
reserved1 0
reserved2 0
Section
sectname __data
segname __DATA
addr 0x000000000008bd60
size 0x0000000000002460
offset 572768
align 2^4 (16)
reloff 0
nreloc 0
flags 0x00000000
reserved1 0
reserved2 0
Section
sectname __interpose
segname __DATA
addr 0x000000000008e1c0
size 0x0000000000000ea0
offset 582080
align 2^4 (16)
reloff 0
nreloc 0
flags 0x00000000
reserved1 0
reserved2 0
Section
sectname __common
segname __DATA
addr 0x000000000008f060
size 0x0000000000001100
offset 0
align 2^4 (16)
reloff 0
nreloc 0
flags 0x00000001
reserved1 0
reserved2 0
Section
sectname __bss
segname __DATA
addr 0x0000000000090180
size 0x0000000000d30768
offset 0
align 2^6 (64)
reloff 0
nreloc 0
flags 0x00000001
reserved1 0
reserved2 0
Load command 2
cmd LC_SEGMENT_64
cmdsize 72
segname __LINKEDIT
vmaddr 0x0000000000dc1000
vmsize 0x000000000004a000
fileoff 589824
filesize 303016
maxprot 0x00000007
initprot 0x00000001
nsects 0
flags 0x0
Load command 3
cmd LC_ID_DYLIB
cmdsize 72
name @rpath/libclang_rt.asan_osx_dynamic.dylib (offset 24)
time stamp 1 Thu Jan 1 01:00:01 1970
current version 0.0.0
compatibility version 0.0.0
Load command 4
cmd LC_DYLD_INFO_ONLY
cmdsize 48
rebase_off 589824
rebase_size 80
bind_off 589904
bind_size 5136
weak_bind_off 595040
weak_bind_size 416
lazy_bind_off 595456
lazy_bind_size 5232
export_off 600688
export_size 4728
Load command 5
cmd LC_SYMTAB
cmdsize 24
symoff 607320
nsyms 7832
stroff 734888
strsize 157952
Load command 6
cmd LC_DYSYMTAB
cmdsize 80
ilocalsym 0
nlocalsym 7279
iextdefsym 7279
nextdefsym 238
iundefsym 7517
nundefsym 315
tocoff 0
ntoc 0
modtaboff 0
nmodtab 0
extrefsymoff 0
nextrefsyms 0
indirectsymoff 732632
nindirectsyms 564
extreloff 0
nextrel 0
locreloff 0
nlocrel 0
Load command 7
cmd LC_UUID
cmdsize 24
uuid CC9B436A-3D4A-35FA-BFDE-3876202FEDB9
Load command 8
cmd LC_VERSION_MIN_MACOSX
cmdsize 16
version 10.9
sdk 10.11
Load command 9
cmd LC_SOURCE_VERSION
cmdsize 16
version 0.0
Load command 10
cmd LC_LOAD_DYLIB
cmdsize 56
name /usr/lib/libc++abi.dylib (offset 24)
time stamp 2 Thu Jan 1 01:00:02 1970
current version 125.0.0
compatibility version 1.0.0
Load command 11
cmd LC_LOAD_DYLIB
cmdsize 48
name /usr/lib/libc++.1.dylib (offset 24)
time stamp 2 Thu Jan 1 01:00:02 1970
current version 120.1.0
compatibility version 1.0.0
Load command 12
cmd LC_LOAD_DYLIB
cmdsize 56
name /usr/lib/libSystem.B.dylib (offset 24)
time stamp 2 Thu Jan 1 01:00:02 1970
current version 1226.10.1
compatibility version 1.0.0
Load command 13
cmd LC_RPATH
cmdsize 40
path @executable_path/../lib (offset 12)
Load command 14
cmd LC_FUNCTION_STARTS
cmdsize 16
dataoff 605416
datasize 1904
Load command 15
cmd LC_DATA_IN_CODE
cmdsize 16
dataoff 607320
datasize 0
[~]% otool -L /Users/filcab/work/llvm-cmake/projects/compiler-rt/test/asan/X86_64DarwinConfig/TestCases/Output/malloc_context_size.cc.tmp
/Users/filcab/work/llvm-cmake/projects/compiler-rt/test/asan/X86_64DarwinConfig/TestCases/Output/malloc_context_size.cc.tmp:
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
@rpath/libclang_rt.asan_osx_dynamic.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libc++abi.dylib (compatibility version 1.0.0, current version 125.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
[~]% otool -l /Users/filcab/work/llvm-cmake/projects/compiler-rt/test/asan/X86_64DarwinConfig/TestCases/Output/malloc_context_size.cc.tmp
/Users/filcab/work/llvm-cmake/projects/compiler-rt/test/asan/X86_64DarwinConfig/TestCases/Output/malloc_context_size.cc.tmp:
Load command 0
cmd LC_SEGMENT_64
cmdsize 72
segname __PAGEZERO
vmaddr 0x0000000000000000
vmsize 0x0000000100000000
fileoff 0
filesize 0
maxprot 0x00000000
initprot 0x00000000
nsects 0
flags 0x0
Load command 1
cmd LC_SEGMENT_64
cmdsize 472
segname __TEXT
vmaddr 0x0000000100000000
vmsize 0x0000000000001000
fileoff 0
filesize 4096
maxprot 0x00000007
initprot 0x00000005
nsects 5
flags 0x0
Section
sectname __text
segname __TEXT
addr 0x0000000100000e70
size 0x00000000000000ad
offset 3696
align 2^4 (16)
reloff 0
nreloc 0
flags 0x80000400
reserved1 0
reserved2 0
Section
sectname __stubs
segname __TEXT
addr 0x0000000100000f1e
size 0x000000000000001e
offset 3870
align 2^1 (2)
reloff 0
nreloc 0
flags 0x80000408
reserved1 0 (index into indirect symbol table)
reserved2 6 (size of stubs)
Section
sectname __stub_helper
segname __TEXT
addr 0x0000000100000f3c
size 0x000000000000002e
offset 3900
align 2^2 (4)
reloff 0
nreloc 0
flags 0x80000400
reserved1 0
reserved2 0
Section
sectname __unwind_info
segname __TEXT
addr 0x0000000100000f6c
size 0x0000000000000050
offset 3948
align 2^2 (4)
reloff 0
nreloc 0
flags 0x00000000
reserved1 0
reserved2 0
Section
sectname __eh_frame
segname __TEXT
addr 0x0000000100000fc0
size 0x0000000000000038
offset 4032
align 2^3 (8)
reloff 0
nreloc 0
flags 0x00000000
reserved1 0
reserved2 0
Load command 2
cmd LC_SEGMENT_64
cmdsize 312
segname __DATA
vmaddr 0x0000000100001000
vmsize 0x0000000000001000
fileoff 4096
filesize 4096
maxprot 0x00000007
initprot 0x00000003
nsects 3
flags 0x0
Section
sectname __nl_symbol_ptr
segname __DATA
addr 0x0000000100001000
size 0x0000000000000010
offset 4096
align 2^3 (8)
reloff 0
nreloc 0
flags 0x00000006
reserved1 5 (index into indirect symbol table)
reserved2 0
Section
sectname __la_symbol_ptr
segname __DATA
addr 0x0000000100001010
size 0x0000000000000028
offset 4112
align 2^3 (8)
reloff 0
nreloc 0
flags 0x00000007
reserved1 7 (index into indirect symbol table)
reserved2 0
Section
sectname __mod_init_func
segname __DATA
addr 0x0000000100001038
size 0x0000000000000008
offset 4152
align 2^3 (8)
reloff 0
nreloc 0
flags 0x00000009
reserved1 0
reserved2 0
Load command 3
cmd LC_SEGMENT_64
cmdsize 72
segname __LINKEDIT
vmaddr 0x0000000100002000
vmsize 0x0000000000001000
fileoff 8192
filesize 1008
maxprot 0x00000007
initprot 0x00000001
nsects 0
flags 0x0
Load command 4
cmd LC_DYLD_INFO_ONLY
cmdsize 48
rebase_off 8192
rebase_size 8
bind_off 8200
bind_size 80
weak_bind_off 8280
weak_bind_size 48
lazy_bind_off 8328
lazy_bind_size 88
export_off 8416
export_size 48
Load command 5
cmd LC_SYMTAB
cmdsize 24
symoff 8472
nsyms 21
stroff 8856
strsize 344
Load command 6
cmd LC_DYSYMTAB
cmdsize 80
ilocalsym 0
nlocalsym 13
iextdefsym 13
nextdefsym 2
iundefsym 15
nundefsym 6
tocoff 0
ntoc 0
modtaboff 0
nmodtab 0
extrefsymoff 0
nextrefsyms 0
indirectsymoff 8808
nindirectsyms 12
extreloff 0
nextrel 0
locreloff 0
nlocrel 0
Load command 7
cmd LC_LOAD_DYLINKER
cmdsize 32
name /usr/lib/dyld (offset 12)
Load command 8
cmd LC_UUID
cmdsize 24
uuid 85C8E067-10BB-30A7-8470-C5DE52BC94EB
Load command 9
cmd LC_VERSION_MIN_MACOSX
cmdsize 16
version 10.11
sdk 10.11
Load command 10
cmd LC_SOURCE_VERSION
cmdsize 16
version 0.0
Load command 11
cmd LC_MAIN
cmdsize 24
entryoff 3696
stacksize 0
Load command 12
cmd LC_LOAD_DYLIB
cmdsize 48
name /usr/lib/libc++.1.dylib (offset 24)
time stamp 2 Thu Jan 1 01:00:02 1970
current version 120.1.0
compatibility version 1.0.0
Load command 13
cmd LC_LOAD_DYLIB
cmdsize 72
name @rpath/libclang_rt.asan_osx_dynamic.dylib (offset 24)
time stamp 2 Thu Jan 1 01:00:02 1970
current version 0.0.0
compatibility version 0.0.0
Load command 14
cmd LC_LOAD_DYLIB
cmdsize 56
name /usr/lib/libc++abi.dylib (offset 24)
time stamp 2 Thu Jan 1 01:00:02 1970
current version 125.0.0
compatibility version 1.0.0
Load command 15
cmd LC_LOAD_DYLIB
cmdsize 56
name /usr/lib/libSystem.B.dylib (offset 24)
time stamp 2 Thu Jan 1 01:00:02 1970
current version 1226.10.1
compatibility version 1.0.0
Load command 16
cmd LC_RPATH
cmdsize 32
path @executable_path (offset 12)
Load command 17
cmd LC_RPATH
cmdsize 80
path /Users/filcab/work/llvm-cmake/bin/../lib/clang/3.9.0/lib/darwin (offset 12)
Load command 18
cmd LC_FUNCTION_STARTS
cmdsize 16
dataoff 8464
datasize 8
Load command 19
cmd LC_DATA_IN_CODE
cmdsize 16
dataoff 8472
datasize 0
[~]%
More information about the llvm-commits
mailing list