[llvm-bugs] [Bug 32393] New: segfault while compiling libobjc2

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 23 08:06:45 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=32393

            Bug ID: 32393
           Summary: segfault while compiling libobjc2
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: andreas at fink.org
                CC: llvm-bugs at lists.llvm.org

Created attachment 18154
  --> https://bugs.llvm.org/attachment.cgi?id=18154&action=edit
source files

Crash while compiling libobjc2 runtime of Gnustep with latest clang from trunk
repository for Debian 8

Was following these instructions:
https://github.com/andreasfink/ulib/blob/master/doc/README-LINUX.txt

which used to work on many other debian 8 VM's before
This is on a clean fresh install of a VM. So either gnustep's code or clangs
code changed in the meantime creating a segfault

this throws a stacktrace

#0 0x00007f20fcbb931a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1+0x85e31a)
#1 0x00007f20fcbb76ae llvm::sys::RunSignalHandlers()
(/usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1+0x85c6ae)
#2 0x00007f20fcbb77ea (/usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1+0x85c7ea)
#3 0x00007f20ff51f890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0xf890)
#4 0x00000000018155d7 clang::Decl::getTranslationUnitDecl()
(/usr/lib/llvm-5.0/bin/clang+0x18155d7)
#5 0x0000000001815619 clang::Decl::getASTContext() const
(/usr/lib/llvm-5.0/bin/clang+0x1815619)
#6 0x0000000001808e4c clang::RecordDecl::mayInsertExtraPadding(bool) const
(/usr/lib/llvm-5.0/bin/clang+0x1808e4c)
#7 0x00000000018d991d (/usr/lib/llvm-5.0/bin/clang+0x18d991d)
#8 0x00000000018d50fe clang::ASTContext::getASTRecordLayout(clang::RecordDecl
const*) const (/usr/lib/llvm-5.0/bin/clang+0x18d50fe)
#9 0x0000000001767948 (/usr/lib/llvm-5.0/bin/clang+0x1767948)
#10 0x000000000178844b
clang::ASTContext::getObjCEncodingForTypeImpl(clang::QualType, std::string&,
bool, bool, clang::FieldDecl const*, bool, bool, bool, bool, bool, bool,
clang::QualType*) const (/usr/lib/llvm-5.0/bin/clang+0x178844b)
#11 0x000000000178a075
clang::ASTContext::getObjCEncodingForType(clang::QualType, std::string&,
clang::FieldDecl const*, clang::QualType*) const
(/usr/lib/llvm-5.0/bin/clang+0x178a075)
#12 0x00000000009eb86a (/usr/lib/llvm-5.0/bin/clang+0x9eb86a)
#13 0x00000000008c24ee (/usr/lib/llvm-5.0/bin/clang+0x8c24ee)
#14 0x0000000000c87423 (/usr/lib/llvm-5.0/bin/clang+0xc87423)
#15 0x0000000000c7f971 (/usr/lib/llvm-5.0/bin/clang+0xc7f971)
#16 0x0000000000dba28e clang::ParseAST(clang::Sema&, bool, bool)
(/usr/lib/llvm-5.0/bin/clang+0xdba28e)
#17 0x0000000000c8557f clang::CodeGenAction::ExecuteAction()
(/usr/lib/llvm-5.0/bin/clang+0xc8557f)
#18 0x0000000000b5521e clang::FrontendAction::Execute()
(/usr/lib/llvm-5.0/bin/clang+0xb5521e)
#19 0x0000000000b2c5be
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/lib/llvm-5.0/bin/clang+0xb2c5be)
#20 0x0000000000bdbd73
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/lib/llvm-5.0/bin/clang+0xbdbd73)
#21 0x00000000007ed7c8 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/lib/llvm-5.0/bin/clang+0x7ed7c8)
#22 0x00000000007dd0ff main (/usr/lib/llvm-5.0/bin/clang+0x7dd0ff)
#23 0x00007f20fb56ab45 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21b45)
#24 0x00000000007eb5b3 _start (/usr/lib/llvm-5.0/bin/clang+0x7eb5b3)
Stack dump:
0.      Program arguments: /usr/lib/llvm-5.0/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier
-discard-value-names -main-file-name zeroSizedIVar.m -mrelocation-model static
-mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -momit-leaf-frame-pointer
-dwarf-column-info -debugger-tuning=gdb -coverage-notes-file
/root/gnustep/libobjc2/Build/Test/CMakeFiles/zeroSizedIVar_optimised.dir/zeroSizedIVar.m.gcno
-D GC_DEBUG -D GNUSTEP -D NO_LEGACY -D TYPE_DEPENDENT_DISPATCH -D
__OBJC_RUNTIME_INTERNAL__=1 -U NDEBUG -O3 -std=gnu99 -ferror-limit 19
-fmessage-length 142 -fblocks -fobjc-runtime=gnustep-1.7
-fobjc-dispatch-method=non-legacy -fobjc-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-x objective-c zeroSizedIVar-d413d5.m
1.      /root/gnustep/libobjc2/Test/zeroSizedIVar.m:27:1: current parser token
'@'
2.      /root/gnustep/libobjc2/Test/zeroSizedIVar.m:25:17: LLVM IR generation
of declaration 'BitfieldTest'
/tmp/zeroSizedIVar-d413d5.sh: line 4: 19590 Segmentation fault     
"/usr/lib/llvm-5.0/bin/clang" "-cc1" "-triple" "x86_64-unknown-linux-gnu"
"-emit-obj" "-disable-free" "-disable-llvm-verifier" "-discard-value-names"
"-main-file-name" "zeroSizedIVar.m" "-mrelocation-model" "static"
"-mthread-model" "posix" "-fmath-errno" "-masm-verbose" "-mconstructor-aliases"
"-munwind-tables" "-fuse-init-array" "-target-cpu" "x86-64"
"-momit-leaf-frame-pointer" "-dwarf-column-info" "-debugger-tuning=gdb"
"-coverage-notes-file"
"/root/gnustep/libobjc2/Build/Test/CMakeFiles/zeroSizedIVar_optimised.dir/zeroSizedIVar.m.gcno"
"-D" "GC_DEBUG" "-D" "GNUSTEP" "-D" "NO_LEGACY" "-D" "TYPE_DEPENDENT_DISPATCH"
"-D" "__OBJC_RUNTIME_INTERNAL__=1" "-U" "NDEBUG" "-O3" "-std=gnu99"
"-ferror-limit" "19" "-fmessage-length" "142" "-fblocks"
"-fobjc-runtime=gnustep-1.7" "-fobjc-dispatch-method=non-legacy"
"-fobjc-exceptions" "-fexceptions" "-fdiagnostics-show-option"
"-fcolor-diagnostics" "-vectorize-loops" "-vectorize-slp" "-x" "objective-c"
"zeroSizedIVar-d413d5.m"

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170323/8baeb1cb/attachment.html>


More information about the llvm-bugs mailing list