segfault in ECC test
Closed this issue · 1 comments
benediamond commented
Hi, thanks for the great work.
After building successfully on OSX Catalina, I get a segfault in the ecc
test:
benediamond@Benjamins-MBP emp-tool % ./bin/ecc
zsh: segmentation fault ./bin/ecc
after doing some digging, it looks like the bad line is the add_mod
call:
Line 22 in 4274548
the reason is that
ctx
is default-assigned to nullptr
here:emp-tool/emp-tool/utils/group_openssl.h
Lines 46 to 50 in 4274548
it can be fixed by replacing line 22 with:
ic = ia.add_mod(ib, G.order, G.bn_ctx);
let me know if you'd like me to raise a PR. thanks.
wangxiao1254 commented
Thank you for pointing the bug. The code has been updated to address this. Also removed the default parameters to enforce a bn_ctx has to be provided.