Skip to content

Bindings: Expect memory growth when lowering references #2568

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

Merged
merged 1 commit into from
Nov 16, 2022
Merged

Conversation

dcodeIO
Copy link
Member

@dcodeIO dcodeIO commented Nov 16, 2022

Fixes #2553 by using a helper function when lowering (what's typically) another lowering to memory:

new Uint32Array(memory.buffer)[pointer >>> 2] = __lowerXY(...);
// ->
__store_ref(pointer, __lowerXY(...));

Changes evaluation order so the LHS view is not invalidated by memory growth in the RHS before the store is performed.

  • I've read the contributing guidelines
  • I've added my name and email to the NOTICE file

@dcodeIO dcodeIO merged commit 8ae086d into main Nov 16, 2022
@HerrCai0907 HerrCai0907 deleted the issue-2553 branch October 17, 2023 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uncaught Error: Element type must be nullable if array is holey in ~lib/array.ts:118:40
1 participant