[llvm-bugs] [Bug 33309] New: Fibonacci example segfault

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 5 00:53:52 PDT 2017


            Bug ID: 33309
           Summary: Fibonacci example segfault
           Product: libraries
           Version: 4.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Core LLVM classes
          Assignee: unassignedbugs at nondot.org
          Reporter: lodovico at giaretart.net
                CC: llvm-bugs at lists.llvm.org

I'm on ArchLinux x86_64

  > uname -a
  Linux <username> 4.11.3-1-ARCH #1 SMP PREEMPT Sun May 28 10:40:17 CEST 2017
x86_64 GNU/Linux

  > llvm-config --version

I'm compiling the Fibonacci example downloaded from the GitHub mirror at [1]
this way (I'm using the fish shell):

  > eval g++ -g3 (llvm-config --cxxflags --ldflags --libs) fib.cpp

It compiles fine (just one warning about a missing sentinel, which is actually
present), but it segfaults. This is the stack trace reported by gdb:

  #0 llvm::Value::getContext() const () from /usr/lib/LLVM-4.0.so
  #1 llvm::Value::setNameImpl(llvm::Twine const&) () from /usr/lib/LLVM-4.0.so
  #2 llvm::Value::setName(llvm::Twine const&) () from /usr/lib/LLVM-4.0.so
  #3 llvm::Function::BuildLazyArguments() const () from /usr/lib/LLVM-4.0.so
  #4 llvm::Function::CheckLazyArguments (this=<optimized out>) at
  #5 llvm::Function:arg_begin (this=<optimized out>) at
  #6 CreateFibFunction (Context=..., M=0x632370) at fib.cpp:67
  #7 main (argc=<optimized out>, argv=0x7fffffffe608) at fib.cpp:114


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/20170605/2519bfbb/attachment.html>

More information about the llvm-bugs mailing list