USCiLab/cereal

De-serialising near zero with XML causes segfault with std library's stof function

Opened this issue · 1 comments

Hi,

I have a struct with near zero float values which has been serialised to xml. Running into the same problem while serialising to binary and back. Seems like near zero values like 0.001f causes some sort of floating point error. Attached is a screenshot with the stacktrace for deserialisation from XML. Is this a bug?

image

Best Regards,

Rebecca.

Can you reproduce this in a very simple test case that only serializes the float and still has an error?