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

Spike: Barretenberg ASSERT should not be ignored in wasm, or workaround #308

Closed
dbanks12 opened this issue Apr 20, 2023 · 3 comments
Closed
Labels
T-bug Type: Bug. Something is broken.

Comments

@dbanks12
Copy link
Collaborator

dbanks12 commented Apr 20, 2023

Asserts/exceptions don't work in wasm by default. This means that bberg functions (stdlib etc) with assertions that SHOULD FAIL, just skip the assertion when running in a wasm environment. This is bad and means that in production assertions will just be skipped!

We need to determine if it's possible/worth it to enable exceptions/asserts in wasm (performance issues?) or some other way to work around this (similar to DummyComposer)?

@dbanks12 dbanks12 added this to A3 Apr 20, 2023
@dbanks12 dbanks12 converted this from a draft issue Apr 20, 2023
@dbanks12 dbanks12 added the T-bug Type: Bug. Something is broken. label Apr 25, 2023
@iAmMichaelConnor iAmMichaelConnor changed the title Barretenberg ASSERT should not be ignored in wasm, or workaround Spike: Barretenberg ASSERT should not be ignored in wasm, or workaround Apr 25, 2023
@ludamad
Copy link
Collaborator

ludamad commented Apr 26, 2023

This is bad, but I guess if we want runtime failures we should use throw_or_abort? I guess they are turned off for speed

ludamad pushed a commit that referenced this issue Jul 14, 2023
* Add debugging CMake preset & update code-workspace

---------

Co-authored-by: Blaine Bublitz <[email protected]>
@iAmMichaelConnor
Copy link
Contributor

Was this resolved with do_assert?

@dbanks12
Copy link
Collaborator Author

Was this resolved with do_assert?

@iAmMichaelConnor I don't think so. I think that this ticket is for real assertions in barretenberg. Maybe we could stop using real asserts in barretenberg and instead implement something similar?

@dbanks12 dbanks12 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 2, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in A3 Jan 2, 2024
codygunton added a commit that referenced this issue Jan 23, 2024
* Add debugging CMake preset & update code-workspace

---------

Co-authored-by: Blaine Bublitz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: Bug. Something is broken.
Projects
Archived in project
Development

No branches or pull requests

3 participants