Skip to content

Commit ca0d0f2

Browse files
committed
Add segfault case
[skip ci]
1 parent 3c33263 commit ca0d0f2

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

test/trim/main_segfault.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module MyModule
2+
include("./optimization_trimmable.jl")
3+
end
4+
5+
function (@main)(argv::Vector{String})::Cint
6+
λ = parse(Float64, argv[2])
7+
sol = MyModule.TestModuleTrimmable.minimize(λ)
8+
println(Core.stdout, sum(sol.u))
9+
return 0
10+
end

test/trim/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ end
5353
# it does start working. Unfortunately, right now it hangs indefinitely
5454
# so we are commenting it out. =#
5555
# ("main_clean.jl", false),
56+
("main_segfault.jl", false),
5657
]
5758
binpath = tempname()
5859
cmd = `$(Base.julia_cmd()) --project=. --depwarn=error $(JULIAC) --experimental --trim=unsafe-warn --output-exe $(binpath) $(mainfile)`

0 commit comments

Comments
 (0)