Skip to content

crashy behavior with Kotlin/JS #6

Open
@danwallach

Description

@danwallach

I've been trying on and off to get gmp-wasm to work for me, and I'm getting a variety of weird behaviors. I suspect one of my bugs can be blamed on Kotlin/JS and another might be related to gmp-wasm. I've created a minimal repository that allows the bugs to be reproduced:

https://github.com/danwallach/gmp-wasm-kotlin

The README.md documents how to run the code and has the outputs. In short, I built a Kotlin BigInteger class that speaks directly to the mpz functions, and tries to manage gmp-wasm memory using FinalizationRegistry (so when the JavaScript wrapper object is garbage collected, it will tell gmp-wasm to free the corresponding mpz object).

I'd appreciate if you could take a look at this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions