Skip to content

Commit b1f14c4

Browse files
committed
lua: Fix isolate teardown segfault issue on macOS
1 parent a9084a6 commit b1f14c4

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

Makefile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@ BUILD-DOC := $(BINDINGS:%=build-doc-%)
4848
INSTALL := $(INSTALL-DIRS:%=install-%)
4949
TEST := $(DIRS:%=test-%)
5050
TEST-BINDINGS := $(BINDINGS:%=test-%)
51-
52-
# XXX - Lua has issues on macOS
53-
ifdef IS-MACOS
54-
TEST := $(filter-out test-lua,$(TEST))
55-
TEST-BINDINGS := $(filter-out test-lua,$(TEST-BINDINGS))
56-
endif
57-
5851
PUBLISH := $(DIRS:%=publish-%)
5952
CLEAN := $(DIRS:%=clean-%)
6053
REALCLEAN := $(DIRS:%=realclean-%)

lua/lib/yamlscript.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,15 @@ function YAMLScript:load(input)
176176
return resp.data
177177
end
178178

179-
-- YAMLScript instance destructor
180-
function YAMLScript:__gc()
179+
-- Manual cleanup method for the isolate
180+
function YAMLScript:close()
181181
if self.isolatethread then
182182
-- Tear down the isolate thread to free resources
183183
local rc = libys.graal_tear_down_isolate(self.isolatethread)
184184
if rc ~= 0 then
185185
error("Failed to tear down isolate")
186186
end
187+
self.isolatethread = nil
187188
end
188189
end
189190

0 commit comments

Comments
 (0)