3 ms·
Sort of related, last night I managed to make Clang crash by feeding it a certain C++ program: https://i.imgur.com/r5MC2aK.png https://i.imgur.com/r5MC2aK.png
by sillysaurusx 5y ago
Sort of related, last night I managed to make Clang crash by feeding it a certain C++ program: https://i.imgur.com/r5MC2aK.png https://i.imgur.com/r5MC2aK.png
It was very surprising that there was a way to get Clang to segfault. Should I report it somewhere?
The code is basically doing a recursive template expansion with some C++20 concept constraints. So it's not quite as simple as "And. And...", but it's similar in that certain input text causes a crash. I just have no idea whether to report it, or where.
- tylerhou 5y agoClang segfaulting is somewhat common. It usually doesn't happen, but sometimes when I write some cursed template metaprogramming code it crashes and I'm not surprised. In your case, especially because you are using C++20 concepts, that is a newer feature and you probably hit some less-tested codepath.
- mtoner23 5y agoDefinitely report it, it'll be fun to see what happens. https://llvm.org/docs/HowToSubmitABug.html https://llvm.org/docs/HowToSubmitABug.html
- sillysaurusx 5y agoThank you for the link! Maybe that should've been obvious to me, but it really wasn't -- I had no clue where to start. The segfault just said "Please attach these files to the bug report" with no more info. Really appreciated. In that case I'll spend some time to clean up the repro case and submit it. Thanks again.
- D-Coder 5y ago> The segfault just said "Please attach these files to the bug report" with no more info. The message should include the URL. Sounds like a bug that should be reported.
- mshockwave 5y ago> Should I report it somewhere? Please do. You can open an issue (Bugzilla has been deprecated) on LLVM's github repo: https://github.com/llvm/llvm-project https://github.com/llvm/llvm-project
- hoten 5y agoYou should report it to their GitHub repro: https://github.com/llvm/llvm-project https://github.com/llvm/llvm-project
- nopakos 5y agoBy chance, I was just reading that typing "x = 4.725" on Atari ST Basic crashed the computer. Still not fixed 35 years later :) [https://en.wikipedia.org/wiki/Atari_ST_BASIC#Bugs https://en.wikipedia.org/wiki/Atari_ST_BASIC#Bugs]
- dzaima 5y agoNote that it might be worth trying the latest clang version first. The latest proper version is 14.0.0 from Mar 25, which is only a month old compared to the 7 months of 13.0.0, but if it's something that's condensable to a single file, you could test it on https://godbolt.org/z/hv41441jK https://godbolt.org/z/hv41441jK, which has daily builds.