-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
This test in GraphPPL.jl causes segmentation fault. The segmentation fault can be reproduced by copy-pasting the content of the test (plus necessary imports) in REPL. Interestingly enough the test passes normally while debugging. So the notable thing is that this line
y = getorcreate!(model, ctx, :y, 1)should return a fully initialized y, but on 1.11 it returns an array of #undef values.

The code in the loop uses isassigned under the hood to initialize the elements of y and the check works correctly during the debugging and in 1.10, e.g in VSCode debugger view I get 
The fact that debugging works normally does not really allow us to narrow down the scope of the issue. It also doesn't seem to happen in real code that relies on this functionality, only in tests. Julia shouldn't really segfault so it might indicate deeper problems somewhere else.
julia> versioninfo()
Julia Version 1.11.1
Commit 8f5b7ca12ad (2024-10-16 10:53 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: macOS (arm64-apple-darwin22.4.0)
CPU: 11 × Apple M3 Pro
WORD_SIZE: 64
LLVM: libLLVM-16.0.6 (ORCJIT, apple-m3)
Threads: 1 default, 0 interactive, 1 GC (on 5 virtual cores)The code that segfaults is on the main branch
commit c97718a10bcf035cff093acf52ee9fe30f225b35 (HEAD -> main, origin/main, origin/HEAD)
Author: Wouter Nuijten <[email protected]>
Date: Fri Oct 11 11:44:21 2024 +0200
Update codecov action
(GraphPPL) pkg> st
Project GraphPPL v4.3.3
Status `~/.julia/dev/GraphPPL.jl/Project.toml`
[0f2f92aa] BitSetTuples v1.1.5
[864edb3b] DataStructures v0.18.20
[85a47980] Dictionaries v0.4.2
[1914dd2f] MacroTools v0.5.13
[fa8bd995] MetaGraphsNext v0.7.1
[d9ec5142] NamedTupleTools v0.14.3
[aedffcd0] Static v1.1.1
[90137ffa] StaticArrays v1.9.8
[9d95972d] TupleTools v1.6.0
[9602ed7d] Unrolled v0.1.5