[LLVMbugs] [Bug 15650] New: Segfault when assigning value to a reference

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Apr 1 15:56:04 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=15650

            Bug ID: 15650
           Summary: Segfault when assigning value to a reference
           Product: clang
           Version: 3.2
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: vk at vedantk.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 10271
  --> http://llvm.org/bugs/attachment.cgi?id=10271&action=edit
clang++ backtrace

clang++ attempted to generate a diagnostic for me on the line;

    /* Right hand side is of type Vector3f. */
    Vector3f& normal = loc.second.normalized();

It segfaulted while doing that. The full trace is attached in the file
"trace.txt". Here are the last few frames;

0  libLLVM-3.2.so  0x00007f34d25f40bf
1  libLLVM-3.2.so  0x00007f34d25f4529
2  libpthread.so.0 0x00007f34d189c1e0
3  libLLVM-3.2.so  0x00007f34d25bbb75 llvm::APInt::countLeadingZerosSlowCase()
const + 37
4  libLLVM-3.2.so  0x00007f34d25bbd5d llvm::APInt::EqualSlowCase(llvm::APInt
const&) const + 253 
5  clang           0x0000000000ec22b9
6  clang           0x0000000000ec3113
7  clang           0x0000000000ec4380
clang::FormatASTNodeDiagnosticArgument(clang::DiagnosticsEngine::ArgumentKind,
long, char const*, unsigned int, char const*, unsigned int,
std::pair<clang::DiagnosticsEngine::ArgumentKind, long> const*, unsigned int,
llvm::SmallVectorImpl<char>&, void*, llvm::ArrayRef<long>) + 240
8  clang           0x00000000010235fa clang::Diagnostic::FormatDiagnostic(char
const*, char const*, llvm::SmallVectorImpl<char>&) const + 2570
9  clang           0x0000000000638787
clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level,
clang::Diagnostic const&) + 87
10 clang           0x0000000001027f20
clang::DiagnosticIDs::EmitDiag(clang::DiagnosticsEngine&,
clang::DiagnosticIDs::Level) const + 48
11 clang           0x0000000001028175
clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const + 389 
12 clang           0x0000000001021d5c
clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool) + 76
13 clang           0x000000000090133b
clang::Sema::EmitCurrentDiagnostic(unsigned int) + 683 

clang++ was able to successfully compile the program when I removed the
reference from the left hand side;

    Vector3f normal = loc.second.normalized();

-- 
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/20130401/f8900d9f/attachment.html>


More information about the llvm-bugs mailing list