herumi / mcl

a portable and fast pairing-based cryptography library
BSD 3-Clause "New" or "Revised" License
450 stars 151 forks source link

op_ not initialized #196

Closed gogoex closed 4 months ago

gogoex commented 4 months ago

Upon calling mclBnG1_serialize, my program gets a segmentation fault in the constructor of FpT in include/fp.hpp line 256:

FpT() {}
FpT(const FpT& x)
{
    op_.fp_copy(v_, x.v_);
}

In debugger, i see that fp_copy = 0x0,, and other functions of op_ are set to zero as well. It looks to me that op_ has not been initialized yet.

Is there any way to ensure op_ to be initialized before the constructor is called?

gogoex commented 4 months ago

Closing since the current master doesn't have this issue.