Skip to content

make test crashes due to JSClosure memory issues #129

Closed
@MaxDesiatov

Description

I'm not sure why this isn't reproducible on CI, but I got it crashing off the latest code in the main branch with a simple make && make test, here's the full output:

Here's the full output:

cd IntegrationTests && \
	    CONFIGURATION=debug make test && \
	    CONFIGURATION=release make test
cd .. && npm run build

> javascript-kit-swift@0.10.1 build
> npm run build:clean && npm run build:ts


> javascript-kit-swift@0.10.1 build:clean
> rm -rf Runtime/lib


> javascript-kit-swift@0.10.1 build:ts
> cd Runtime; tsc -b

swift build --package-path TestSuites \
	            --product PrimaryTests \
	            --triple wasm32-unknown-wasi \
	            --configuration debug
[1/1] Linking PrimaryTests.wasm
mkdir -p dist
cp TestSuites/.build/debug/PrimaryTests.wasm dist/PrimaryTests.wasm
node bin/primary-tests.js
Fatal error: The function was already released: file JavaScriptKit/JSClosure.swift, line 143

Fatal error: release() must be called on JSClosure objects manually before they are deallocated: file JavaScriptKit/JSClosure.swift, line 97

Fatal error: The function was already released: file JavaScriptKit/JSClosure.swift, line 143

rm TestSuites/.build/debug/PrimaryTests.wasm
cd .. && npm run build

> javascript-kit-swift@0.10.1 build
> npm run build:clean && npm run build:ts


> javascript-kit-swift@0.10.1 build:clean
> rm -rf Runtime/lib


> javascript-kit-swift@0.10.1 build:ts
> cd Runtime; tsc -b

swift build --package-path TestSuites \
	            --product PrimaryTests \
	            --triple wasm32-unknown-wasi \
	            --configuration release
[1/1] Linking PrimaryTests.wasm
mkdir -p dist
cp TestSuites/.build/release/PrimaryTests.wasm dist/PrimaryTests.wasm
node bin/primary-tests.js
Fatal error: The function was already released: file JavaScriptKit/JSClosure.swift, line 143

Fatal error: release() must be called on JSClosure objects manually before they are deallocated: file JavaScriptKit/JSClosure.swift, line 97

Fatal error: The function was already released: file JavaScriptKit/JSClosure.swift, line 143

rm TestSuites/.build/release/PrimaryTests.wasm

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions