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

EIP-2537: Potential memory leak in G1 and G2 MSM #384

Closed
mratsim opened this issue May 16, 2024 · 0 comments · Fixed by #407
Closed

EIP-2537: Potential memory leak in G1 and G2 MSM #384

mratsim opened this issue May 16, 2024 · 0 comments · Fixed by #407
Labels
bug 🪲 Something isn't working good first issue 🔧 Good for newcomers

Comments

@mratsim
Copy link
Owner

mratsim commented May 16, 2024

See https://github.com/mratsim/constantine/blob/master/constantine%2Fethereum_evm_precompiles.nim#L907 (link to be edited with fixed commit on a computer)

The code allocates but then can return early without dealloc.

We need to introduce a check macro similar to KZG commitments with early returns.

Note: we don't use Nim's builtin defer to ensure that no exceptions and so no runtime (that need to be initialized before used when building a DLL) is included as much as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working good first issue 🔧 Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant