Skip to content

Commit

Permalink
fix: S example segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
tydeu committed May 7, 2024
1 parent 2c6dea2 commit d2c496f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/S/S.lean
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static S g_s = {0, 0, NULL};
end

alloy c opaque_extern_type S => S where
foreach(s, f) := lean_apply_1(f, s->m_s)
foreach(s, f) := lean_inc(f); lean_apply_1(f, s->m_s)
finalize(s) := lean_dec(s->m_s); free(s)

--------------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions examples/S/lakefile.lean
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import Lake
open Lake DSL

package s {
package s where
buildType := .debug
}

require alloy from ".."/".."

Expand Down
2 changes: 1 addition & 1 deletion examples/S/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ rm -rf .lake
LAKE=${LAKE:-lake}
$LAKE build -U
$LAKE build Test -v
#.lake/build/bin/s # TODO: Segfaults for some reason
.lake/build/bin/s

0 comments on commit d2c496f

Please sign in to comment.