Open ottojo opened 1 week ago
@llvm/issue-subscribers-clang-modules
Author: Jonas Otto (ottojo)
As I may not be able to debug this immediately, would you like to test this again with trunk in debug version? A complete stack trace may be helpful too.
I did build main at 8ab66775dc885f7a99ee5f53771ce555e42085f9, and found the curious behavior that the build now succeeds when building clang in RelWithDebInfo mode, and still fails in Debug? Although i dont have much confidence that everything was built correctly, as i did run out of disk space while compiling...
In any case, there might still be some issue hidden so here is the data from the crash in debug mode:
I did build main at 8ab6677, and found the curious behavior that the build now succeeds when building clang in RelWithDebInfo mode, and still fails in Debug? Although i dont have much confidence that everything was built correctly, as i did run out of disk space while compiling...
The reason may be that the check only happens with assertion enabled. And assertions is not enabled by default with release builds. If you're playing with modules (instead of trying to make it in products), I think, maybe, you can continue the experiment with release builds without assertions.
BTW, if you would like to contribute, maybe you can try to bisect to find where the problem shows up.
You said clang17 failed for other reasons. So it can't be bisected usually. Then you can bisect to find the commit that makes the other failure goes away. And in that time, if it builds correctly, then it is a regression. Otherwise, it may be a long-standing non-found issue. Then if you still want to dig in, you can try to reduce the reproducer you provide.
Coincidently, I just met a pretty similar issue during the development. And I tried to fix that. Can you try to confirm if this fixes your problem?
I was playing around with C++20 modules and came across this crash when trying to include simdjson. Notably this only appeared when i switched to clang18, compilation under clang17 failed for other reason (without crash).
Scope-ed983e.cppm.txt Scope-ed983e.sh.txt
edit: for reference, since the preprocessed sources are huge, the input file just looks like this :D