Version dependent segfault using ccall

I am running into segmentation faults and/or std::bad_alloc errors when using the TBLIS C interface. However, the error does not appear on 1.4.x, either built from source or from binaries, but does occur on 1.5.0-beta1 and nightly builds.

Is anyone aware of any changes that may be causing this behavior? All I have been able to find is that LLVM is upgraded to 9.0.1 in 1.5+. Is there a way to build 1.4.2 with LLVM 9 to test if this is the issue?

The source code can be found here.

Previously I have had similar issues (Segfault using ccall on initialization function) but that seemed to be resolved with the helpful comments from @yuyichao.

Any help would be appreciated!

I don’t think anything from LLVM is going to have anything to do with this. OTOH, incorrectly used ccall can easily cause crash in a certain version much more often then another just based on a tone of unrelated details…


This ended up being almost absurdly simple to fix: simply changing a structure from struct to mutable struct fixed the problem. I’m curious now why it worked at all on 1.4.2 …