I’m the developer of the package CpuId. I’m currently facing an issue which appears to only occur when testing the package through the package manager, viz. typing
]test CpuId. In that case, the core functions containing an llvmcall are somehow differently inlined and yield a segfault. This does not seem to occur in, say, regular operations. I have theories on why this happens, but I can’t reproduce the issue outside the package manager testing environment.
My question: How do I get a view on the generated code when testing through the package manager? (eg. @testset, @test etc.).
Not directly answering your question, but did you try to launch a Julia REPL with the same command line flags used in Pkg.jl?: https://github.com/JuliaLang/Pkg.jl/blob/853b3f1fd9895db32b402d89e9dee153b66b2316/src/Operations.jl#L1294-L1309
@test wraps code into a
try block, it may help if you do so when generating the code.
Pkg.test just spawns a new Julia process and runs
test/runtests.jl, so you should be able to reproduce everything that way.
Thanks, @tkf and @Tamas_Papp. Found the additional option
--check-bounds=yes for julia when using
Pkg.test. These additional bounds checks are in fact triggering the segfaults.