emscripten-core / emscripten-core/emscripten

test_wasmfs_opfs fails when run in unoptimized build

Open
#19,055 0 comments 0 reactions 0 assignees View on GitHub
wasmfs
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

Remove the `-O3` arg in the test and run it:

```
out.js:977 Uncaught (in promise) RuntimeError: Aborted(Assertion failed: state.getKind() == OpenState::None, at: /usr/local/google/home/dahlb/projects/emscripten/system/lib/wasmfs/backends/opfs_backend.cpp,254,~OPFSFile)
at abort (a.out.js:977:11)
at ___assert_fail (a.out.js:1845:7)
at (anonymous namespace)::OPFSFile::~OPFSFile() (a.out.wasm)
at std::__2::__shared_ptr_emplace<(anonymous namespace)::OPFSFile, std::__2::allocator<(anonymous namespace)::OPFSFile>>::__on_zero_shared() (a.out.wasm)
at std::__2::__shared_ptr_emplace>::__on_zero_shared() (a.out.wasm)
at wasmfs::WasmFS::~WasmFS() (a.out.wasm)
at __cxx_global_array_dtor.6 (a.out.wasm)
at __funcs_on_exit (a.out.wasm)
at a.out.js:1016:22
at exitRuntime (a.out.js:811:3)
```

Looks like this is after: https://github.com/emscripten-core/emscripten/blob/b116323214e11982d611fe9cd8d27c47d41783d7/test/wasmfs/wasmfs_opfs.c#L90

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.