Skip to content

Crash in clang::ASTReader::ReadSLocEntry #25216

@llvmbot

Description

@llvmbot
Bugzilla Link 24842
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor
CC @akyrtzi

Extended Description

This a regression caused by:

r220966 | akirtzidis | 2014-10-31 20:44:32 +0400 (Fri, 31 Oct 2014) | 1 line

[libclang] Disable spell-checking and warnings during code-completion since they are not needed.

Reverting that commit, fixes the issue.

No easy reproducible test case available, but here is a backtrace:

0x00007fff8ee08225 in clang::ASTReader::ReadSLocEntry (
this=0x7fff996ade30, ID=-24789)
at /Projects/llvm/tools/clang/lib/Serialization/ASTReader.cpp:1196
1196 F->SLocEntryCursor.JumpToBit(F->SLocEntryOffsets[ID - F->SLocEntryBaseID]);
(gdb) bt
#​0 0x00007fff8ee08225 in clang::ASTReader::ReadSLocEntry (
this=0x7fff996ade30, ID=-24789)
at /Projects/llvm/tools/clang/lib/Serialization/ASTReader.cpp:1196
#​1 0x00007fff8ee0ae22 in non-virtual thunk to clang::ASTReader::ReadSLocEntry(int) ()
at /Projects/llvm/tools/clang/lib/Serialization/ASTReader.cpp:1313
#​2 0x00007fff8d4ccb09 in clang::SourceManager::loadSLocEntry (
this=0x7fff066e1710, Index=24787, Invalid=0x0)
at /Projects/llvm/tools/clang/lib/Basic/SourceManager.cpp:467
#​3 0x00007fff8cfd60de in clang::SourceManager::getLoadedSLocEntry (
this=0x7fff066e1710, Index=24787, Invalid=0x0)
at /Projects/llvm/tools/clang/include/clang/Basic/SourceManager.h:1494
#​4 0x00007fff8cfd5dff in clang::SourceManager::getLoadedSLocEntryByID (
this=0x7fff066e1710, ID=-24789, Invalid=0x0)
at /Projects/llvm/tools/clang/include/clang/Basic/SourceManager.h:1577
#​5 0x00007fff8cfd5da9 in clang::SourceManager::getSLocEntryByID (
this=0x7fff066e1710, ID=-24789, Invalid=0x0)
at /Projects/llvm/tools/clang/include/clang/Basic/SourceManager.h:1571
#​6 0x00007fff8cfd5d0b in clang::SourceManager::isOffsetInFileID (
this=0x7fff066e1710, FID=..., SLocOffset=2140763772)
at /Projects/llvm/tools/clang/include/clang/Basic/SourceManager.h:1604
#​7 0x00007fff8d4cea43 in clang::SourceManager::getFileIDLoaded (
this=0x7fff066e1710, SLocOffset=2140763772)
at /Projects/llvm/tools/clang/lib/Basic/SourceManager.cpp:880
#​8 0x00007fff8d4ce2b9 in clang::SourceManager::getFileIDSlow (
this=0x7fff066e1710, SLocOffset=2140763772)
at /Projects/llvm/tools/clang/lib/Basic/SourceManager.cpp:725
#​9 0x00007fff8cfb3b49 in clang::SourceManager::getFileID (
this=0x7fff066e1710, SpellingLoc=...)
at /Projects/llvm/tools/clang/include/clang/Basic/SourceManager.h:968
#​10 0x00007fff8cfa75f5 in clang::SourceManager::getDecomposedLoc (
this=0x7fff066e1710, Loc=...)
at /Projects/llvm/tools/clang/include/clang/Basic/SourceManager.h:1089
#​11 0x00007fff8d019936 in clang_getFileLocation (location=...,
file=0x0, line=0x7fffc0e7bab4, column=0x7fffc0e7bab0,
offset=0x0)
at /Projects/llvm/tools/clang/tools/libclang/CXSourceLocation.cpp:374

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions