You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This happens when passing Crystal::Debug::All for the debug info. It doesn't happen with Crystal::Debug::None. It seems to be related to disposing an llvm MDNode twice, or something like that.
I have no idea why it happens. Our code makes sure that an LLVM::Context is disposed only once. Maybe our custom bindings to the LLVM C++ debug API has bugs, I don't know. I also tried to trace this in LLVM's source code but it's huge and it's written in C++.
The "good" thing is that this is very unlikely to happen when compiling one file. But there's a chance it happens in tests, and then we have to restart CI from time to time and hope it passes.
Any help finding the cause of this would be greatly appreciated! :-)
The text was updated successfully, but these errors were encountered:
The DIBuilder is attached to a Module or Context, doesn't it? Would it be possible that we dispose of the module/context before we dispose of the DIBuilder but the DIBuilder dispose method needs to access it?
I was able to "reduce" the random crash that sometimes happens on travis and CI.
To reproduce, compile this file:
The run it, making sure to set the
CRYSTAL_PATH
env var to the "src" folder of the compiler, otherwise the prelude won't be found.The crash happens randomly, so after it prints "Start: 20" you can ctrl+c and then run it again. This is the crash I sometimes get:
Sometimes the trace is a bit different.
This happens when passing
Crystal::Debug::All
for the debug info. It doesn't happen withCrystal::Debug::None
. It seems to be related to disposing an llvmMDNode
twice, or something like that.I have no idea why it happens. Our code makes sure that an
LLVM::Context
is disposed only once. Maybe our custom bindings to the LLVM C++ debug API has bugs, I don't know. I also tried to trace this in LLVM's source code but it's huge and it's written in C++.The "good" thing is that this is very unlikely to happen when compiling one file. But there's a chance it happens in tests, and then we have to restart CI from time to time and hope it passes.
Any help finding the cause of this would be greatly appreciated! :-)
The text was updated successfully, but these errors were encountered: