Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Segfault on merkle tree. #178

@martun

Description

@martun

I receive segmentation fault on assigner call like this:

Circuit and inputs.zip

./build/bin/assigner/assigner -b build/examples/cpp/merkle_tree_256_1_cpp.ll -p examples/inputs/merkle_tree_256x1_private.inp -i examples/inputs/merkle_tree_256x1_public.inp -t merkle_tree_256_1_cpp_assignment.tbl -c merkle_tree_256_1_cpp_circuit.crct -e pallas
UNREACHABLE at /root/martun/zkLLVM/libs/assigner/include/nil/blueprint/parser.hpp:800
	Offset does not match memory
 #0 0x00007f1b30cd68d7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/root/martun/zkLLVM/build/libs/circifier/llvm/lib/libLLVMSupport.so.17+0x1778d7)
 #1 0x00007f1b30cd484c llvm::sys::RunSignalHandlers() (/root/martun/zkLLVM/build/libs/circifier/llvm/lib/libLLVMSupport.so.17+0x17584c)
 #2 0x00007f1b30cd6f7a SignalHandler(int) Signals.cpp:0:0
 #3 0x00007f1b2e4ed520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x00007f1b2e5419fc __pthread_kill_implementation ./nptl/./nptl/pthread_kill.c:44:76
 #5 0x00007f1b2e5419fc __pthread_kill_internal ./nptl/./nptl/pthread_kill.c:78:10
 #6 0x00007f1b2e5419fc pthread_kill ./nptl/./nptl/pthread_kill.c:89:10
 #7 0x00007f1b2e4ed476 gsignal ./signal/../sysdeps/posix/raise.c:27:6
 #8 0x00007f1b2e4d37f3 abort ./stdlib/./stdlib/abort.c:81:7
 #9 0x000000000042e746 (./build/bin/assigner/assigner+0x42e746)
#10 0x000000000042e7bc (./build/bin/assigner/assigner+0x42e7bc)
#11 0x00000000006e071e (./build/bin/assigner/assigner+0x6e071e)
#12 0x00000000004d6dc0 nil::blueprint::parser<nil::crypto3::algebra::fields::pallas_base_field, nil::crypto3::zk::snark::plonk_arithmetization_params<15ul, 1ul, 35ul, 36ul> >::handle_gep(llvm::Value const*, llvm::Value const*, llvm::Type*, std::vector<int, std::allocator<int> > const&, nil::blueprint::stack_frame<nil::crypto3::zk::snark::plonk_variable<nil::crypto3::algebra::fields::detail::element_fp<nil::crypto3::algebra::fields::params<nil::crypto3::algebra::fields::pallas_base_field> > > >&) (./build/bin/assigner/assigner+0x4d6dc0)
#13 0x000000000049fb0b nil::blueprint::parser<nil::crypto3::algebra::fields::pallas_base_field, nil::crypto3::zk::snark::plonk_arithmetization_params<15ul, 1ul, 35ul, 36ul> >::handle_instruction(llvm::Instruction const*) (./build/bin/assigner/assigner+0x49fb0b)
#14 0x000000000045bb18 nil::blueprint::parser<nil::crypto3::algebra::fields::pallas_base_field, nil::crypto3::zk::snark::plonk_arithmetization_params<15ul, 1ul, 35ul, 36ul> >::evaluate(llvm::Module const&, boost::json::array const&, boost::json::array const&) (./build/bin/assigner/assigner+0x45bb18)
#15 0x000000000043a499 int curve_dependent_main<nil::crypto3::algebra::fields::pallas_base_field>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long, bool, boost::log::v2s_mt_posix::trivial::severity_level, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, unsigned int, nil::blueprint::print_format) (./build/bin/assigner/assigner+0x43a499)
#16 0x0000000000433967 main (./build/bin/assigner/assigner+0x433967)
#17 0x00007f1b2e4d4d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#18 0x00007f1b2e4d4e40 call_init ./csu/../csu/libc-start.c:128:20
#19 0x00007f1b2e4d4e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#20 0x000000000041b5b5 _start (./build/bin/assigner/assigner+0x41b5b5)
Aborted (core dumped)

Metadata

Metadata

Assignees

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