Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaScript GC has issues #6738

Closed
embeddedt opened this issue Dec 27, 2020 · 1 comment
Closed

JavaScript GC has issues #6738

embeddedt opened this issue Dec 27, 2020 · 1 comment

Comments

@embeddedt
Copy link

embeddedt commented Dec 27, 2020

The JavaScript port's garbage collector may need to be revisited. I am not sure where the exact problem is, but running import gc followed by gc.collect triggers the following error:

RuntimeError: memory access out of bounds
    at wasm-function[35]:0x15fa
    at invoke_vii (ports/javascript/build/micropython.js:2188:25)
    at wasm-function[1387]:0xa200b
    at wasm-function[1094]:0x79b38
    at wasm-function[647]:0x4b571
    at wasm-function[426]:0x3554d
    at wasm-function[424]:0x3543c
    at invoke_iiii (ports/javascript/build/micropython.js:2133:32)
    at wasm-function[1179]:0x7f687
    at wasm-function[657]:0x4c416

EDIT: I should also note that this is being compiled with Emscripten 2.0.4, which uses WebAssembly instead of asm.js. However, we found that the same crash occurs in asm.js mode (though the stack trace is obviously different).

dpgeorge added a commit to dpgeorge/micropython that referenced this issue Jun 25, 2021
The GC now works correctly using asyncify and the functions
emscripten_scan_stack() and emscripten_scan_registers().  Stack/call depth
is monitored via the use of the pystack option.

Fixes issue micropython#6738.

Signed-off-by: Damien George <damien@micropython.org>
@dpgeorge
Copy link
Member

Should be fixed by c13853f

tannewt pushed a commit to tannewt/circuitpython that referenced this issue Aug 10, 2022
…et-confusion

switch back one I2C message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants