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

Using Yosys with arrays of struct appears to cause segfault #22

Closed
davidbrucecousins opened this issue Jun 17, 2022 · 1 comment
Closed

Comments

@davidbrucecousins
Copy link

the following system runs for cleartext, openfhe, interpreted_openfhe, but yosys_interpreted_openfhe causes a segfault

when run with a debugger gives the following backtrace
Thread 1 "bug_yosys_inter" received signal SIGSEGV, Segmentation fault.
__gnu_cxx::__atomic_add_dispatch (__val=1, __mem=0xea)
at /usr/include/c++/9/ext/atomicity.h:96
96 __atomic_add(__mem, __val);
(gdb) bt
#0 __gnu_cxx::__atomic_add_dispatch (__val=1, __mem=0xea)
at /usr/include/c++/9/ext/atomicity.h:96
#1 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy (
this=0xe2) at /usr/include/c++/9/bits/shared_ptr_base.h:139
#2 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator= (__r=...,
this=0x555555bb1020) at /usr/include/c++/9/bits/shared_ptr_base.h:747
#3 std::__shared_ptr<lbcrypto::LWECiphertextImpl, (__gnu_cxx::_Lock_policy)2>::operator= (this=0x555555bb1018)
at /usr/include/c++/9/bits/shared_ptr_base.h:1080
#4 std::shared_ptrlbcrypto::LWECiphertextImpl::operator= (
this=0x555555bb1018) at /usr/include/c++/9/bits/shared_ptr.h:103
#5 fully_homomorphic_encryption::transpiler::YosysOpenFheRunner::YosysOpenFheRunnerState::Run (this=0x555555bcc850, result=..., in_args=...,
inout_args=std::vector of length 1, capacity 1 = {...})
at transpiler/yosys_openfhe_runner.cc:310
#6 0x00005555555c82d4 in fully_homomorphic_encryption::transpiler::YosysOpenFheRunner::Run (this=, result=...,
in_args=std::vector of length 3, capacity 3 = {...},
inout_args=std::vector of length 1, capacity 1 = {...}, cc=...)
at /usr/include/c++/9/bits/stl_uninitialized.h:82
#7 0x000055555558d3bc in select_struct_UNSAFE(absl::Span<std::shared_ptrlbcrypto::LWECiphertextImpl const>, absl::Span<std::shared_ptrlbcrypto::LWECiphertextImpl const>, absl::Span<std::shared_ptrlbcrypto::LWECiphertextImpl const>, absl::Span<std::shared_ptrlbcrypto::LWECiphertextImpl >, lbcrypto::BinFHEContext) () at /usr/include/c++/9/bits/stl_tree.h:211
#8 0x0000555555589de8 in select_struct(OpenFheArrayRef<BugStruct, 2u>, OpenFheRef, OpenFheRef, OpenFheRef, lbcrypto::BinFHEContext) () at /usr/include/c++/9/bits/stl_tree.h:211
#9 0x0000555555582e0b in main () at /usr/include/c++/9/ext/new_allocator.h:89
(gdb)
bug.zip

@Cam2337
Copy link
Collaborator

Cam2337 commented Jun 28, 2022

Closed with 6c169ff.

@Cam2337 Cam2337 closed this as completed Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants