-
Notifications
You must be signed in to change notification settings - Fork 13.5k
clang crashes on Assertion `NextLocalOffset + Length + 1 > NextLocalOffset && NextLocalOffset + Length + 1 <= CurrentLoadedOffset && "Ran out of source locations!"' failed. #42893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I am the author and maintainer of the Boost VMD library. When running the test_doc_modifiers_return_type test I received a stack dump. The output of the stack dump is: clang-10: /opt/LinuxShare/vcs/llvm-project/clang/lib/Basic/SourceManager.cpp:634: clang::SourceLocation clang::SourceManager::createExpansionLocImpl(const clang::SrcMgr::ExpansionInfo&, unsigned int, int, unsigned int): Assertion `NextLocalOffset + TokLength + 1 > NextLocalOffset && NextLocalOffset + TokLength + 1 <= CurrentLoadedOffset && "Ran out of source locations!"' failed.
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: "/home/fceldiener/build/clang/final/bin/clang++" -c -x c++ -fvisibility-inlines-hidden -fPIC -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden -pedantic-errors -std=c++11 -DBOOST_ALL_NO_LIB=1 -I"../../.." -o "/home/fceldiener/build/boost/bin.v2/libs/vmd/test/test_doc_modifiers_return_type.test/clang-c11-linux-10.0/debug/threading-multi/visibility-hidden/test_doc_modifiers_return_type.o" "test_doc_modifiers_return_type.cpp" |
The preprocessed sourcce is at https://www.dropbox.com/home?preview=test_doc_modifiers_return_type-aaea0e.cpp The associated run script is at https://www.dropbox.com/home?preview=test_doc_modifiers_return_type-aaea0e.sh. |
encountered the same bug with clang 12.0.1 and boost 1.80 |
@llvm/issue-subscribers-clang-frontend |
Could you please try 15 or |
You can paste your code and inspect it in the compiler explorer. It will be very appreciate if you can provide short link to godbolt here! |
PS: use "clang trunk" / "assertion trunk" to check if this bug still exists (it is relatively old!) |
It turns out that the code is just too long... @inclyc @EugeneZelenko I tried it on fedora 37 with clang-15.0.0 and this is the output: [sdlzx@fedora status]$ "clang++" -c -x c++ -fvisibility-inlines-hidden -fPIC -m64 -pthread -O3 -Wall -g -fvisibility=hidden -Wno-inline --target=x86_64-pc-linux -DBOOST_ALL_NO_LIB=1 -DBOOST_BEAST_ALLOW_DEPRECATED -DBOOST_BEAST_SEPARATE_COMPILATION -DNDEBUG -I".." -o "../bin.v2/libs/vmd/test/test_doc_modifiers_return_type.test/clang-linux-15/release/debug-symbols-on/pch-off/threading-multi/visibility-hidden/test_doc_modifiers_return_type.o" "../libs/vmd/test/test_doc_modifiers_return_type.cpp" fatal error: sorry, this include generates a translation unit too large for Clang to process. |
#0 0x00007f66d1c7b155 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/lib64/libLLVM-15.so+0xc7b155) PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: |
Can you upload these preprocessed sources here? |
test_doc_modifiers_return_type-b353f4.zip
|
@inclyc I don't know how to use boost in godbolt and the preprocessed file is too large to paste into godbolt. |
Thanks! Your uploaded sources here give us all necessary information I think. |
The assertion is
|
This is a duplicate of #23843 |
The text was updated successfully, but these errors were encountered: