-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Regression(225083:225087): Assertion failed: DISubprogram(Scope).describes(MF->getFunction() #22470
Comments
Shorter command that probably will repro this on posix too (still building a new enough clang to check): "D:\src\llvm-ninja-rel64\bin\clang-cl.exe" "-cc1" "-triple" "i386-pc-windows-msvc" "-emit-obj" "-gline-tables-only" "-O2" "-std=c++11" "-fms-extensions" "-fms-compatibility" "-fdelayed-template-parsing" "-x" "c++" -w foo.ii |
Yup, reproduces on posix too. Delta is running now, but the file is pretty big and takes ~5s per run, so it'll likely take several hours. If you see what's wrong without getting a reduced repro, you might want to not wait for the reduced repro :-) |
reduce testcase |
Build with -O2 -g for this one. |
reduced.cc |
reduced.cc |
normal c++ program, no objective-c blocks or nothin', no optimizations needed to trigger: |
*** Bug llvm/llvm-bugzilla-archive#22114 has been marked as a duplicate of this bug. *** |
Here's the reduction I arrived at, doesn't use blocks, any always_inline attributes, or even templates: $ cat repro.ii int ConvertIPv4NumberToIPv6Number(int); struct SourceAddressTokenTest { |
I reverted r225085 in r225361. This made the assert I was seeing go away. Do others still see their asserts? |
I tried some of the other reductions on this bug, they don't crash for me anymore either. I'll mark this as closed; shout if you're still seeing it. |
The State.cpp issue is still present -- inlining of a global constructor. |
Huh strange, that was one of the ones I tried: $ bin/clang -cc1 -w -triple i386-pc-windows-msvc -O2 -emit-obj -g ~/Downloads/State-fc3936.cpp I tried a few more flag combinations I could think of. What command are you running to see a crash? $ bin/clang --version |
Hm. Difference in the way constructors are done, maybe? clang -O2 -g -target x86_64-linux -c State-fc3936.cpp |
Reverted in r225555. Sorry for the delay - been a busy week. Between this bug and the review thread I have 4 crash test cases, one that was resolved by Nico reverting one of the subsequent patches, the other 3 still crash until I submitted that revert. I'll work up more isolated test cases for them and then see about fixing them before resubmitting this patch. If anyone else happens across any more reductions it'd be great for me to have them so I can address/verify them before recommitting. |
Here's another testcase: struct A { struct Class { template $ clang -cc1 -emit-obj -w -fexceptions -fcxx-exceptions -gline-tables-only -O2 -std=gnu++11 |
Thanks for the revert! |
mentioned in issue llvm/llvm-bugzilla-archive#22114 |
Extended Description
Our Chromium clang/win bots started seeing
Assertion failed: DISubprogram(Scope).describes(MF->getFunction()), file C:\b\build\slave\CrWinClang\build\src\third_party\llvm\lib\CodeGen\LexicalScopes.cpp, line 179
again. This started when clang updated from 225082 to 225087 on the bot. r225083 or (more likely) r225085 look very related.
The text was updated successfully, but these errors were encountered: