cereal icon indicating copy to clipboard operation
cereal copied to clipboard

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

Open beckylum0216 opened this issue 2 years ago • 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.

beckylum0216 avatar Apr 27 '22 13:04 beckylum0216

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

AzothAmmo avatar May 02 '22 04:05 AzothAmmo