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

fix(typeinfo): expanding seq doesn't clear locations #1463

Merged
merged 1 commit into from
Sep 25, 2024

Commits on Sep 25, 2024

  1. fix(typeinfo): expanding seq doesn't clear locations

    Summary
    =======
    
    New seq slots are now zeroed when expanding the seq via `invokeNewSeq`
    or `extendSeq`, making the behaviour consistent with `setLen` and
    `newSeq`, and also fixing crashes with `marshal` caused by the
    uninitialized memory.
    
    Details
    =======
    
    Zeroing the memory is not correct for types that don't have a zero-
    default, but those cannot be detected with just RTTI. Zeroing the
    memory is usually still better then leaving it as is.
    
    For the JavaScript and VM backends, the zeroMem call is excluded from
    compilation. Using `invokeNewSeq` and `extendSeq` is already not
    possible on these backends.
    zerbina committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    2e79550 View commit details
    Browse the repository at this point in the history