Different parsed value for large float in Linux ARM architecture
Now, I'm not 100% sure this is a problem in Ada_TOML, but I guess this is the best place to start.
While attempting to build Alire on the new Linux 24.04 ARM runners, I got a test failure where the value 1.7976931348623157e+308 is not accepted as a valid positive float in range of IEEE Float 64. Given that this is a standard type in Interfaces that accepts that literal in both architectures, I expect the parsing should produce the same result. I see this value reported as the largest float in IEEE f64 range.
I don't have a reproducer right now to attach, but manual debugging points to the following difference in the returned TOML.Any_Float:
On X64, the parsed float is returned as Regular with the given value.
On AARCH64, the return value is Infinity with Positive flag.
Here is a reproducer: https://github.com/mosteo/bug_bigfloat_adatoml/actions/runs/13140259512
It seems to be a problem with GNAT 10 and not in ada-toml.
Hello! Thank you for investigating this. I must admit I wasn’t sure how to proceed, as I don’t have an ARM/AArch64 machine at hand, except the ones from GitHub actions…
But I’m not surprised by your analysis: the parser just builds up a string from the different parts of the float extracted from the TOML document, and then hands them over to the Ada runtime with the 'Value attribute: https://github.com/pmderodat/ada-toml/blob/master/src/toml-generic_parse.adb#L2108 so if there is trouble decoding a particular value, this most likely comes from the GNAT runtime.