Skip to content

Segmentation fault when generating witness with C++ #127

Closed
@JSedlmeir92

Description

@JSedlmeir92

When using the ecdsa_verify circuit from https://github.com/personaelabs/efficient-zk-sig and a slight modification thereof that avoids nested JSONs to make it compatible with ark-circom, I noticed that witness generation with C++ aborts with a segmentation fault, while WASM-based witness generation works just fine. I traced the problem down to where the release_memory_component in CheckCarryToZero_22_run in circuit_cpp/circuit.cpp is called. In the telegram channel, I was told that release_memory_component was only added recently, so probably this is the issue. When the release_memory_component is not called from CheckCarryToZero_22, the witness is generated successfully.

A minimal example to recreate the issue can be found at https://github.com/JSedlmeir92/circomCWtnsGenBugExample. Thank you for keeping up the great work on circom!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions