Open j9liu opened 1 month ago
I just ran into this issue locally with GCC 13.1.0.
Turns out the actual culprit is an OS update -- the runner is now using ubuntu-24
instead of ubuntu-22
.
I wonder if the narrowing conversion error is related to the test failures we encountered earlier with mac: #867
Locally I got the test to pass by changing it to 2^64 - 2
. Weird because both 2^64 - 1
and 2^64 - 2
are not representable as double. 🤷
Interesting... 🤔 @lilleyse could you see what getSafeNumber
is returning when the test doesn't throw? (for 2^64 - 1
).
In the past I've gotten weird errors with uint64_t
that resulted in some weird undefined behavior in some cases. It almost souns like an overflow is happening under-the-hood that makes the value wrap around to 0 or a smaller number... but since the value is being returned by std::numeric_limits
I feel like that shouldn't be right.
Even stranger, it passes in debug mode but not release.
getSafeNumber
returns 18446744073709551616.0
which ought to have thrown.
Moved this out of yesterday's release because we worked around it by temporarily downgrading to Ubuntu 22.04 on CI.
Looks like CI is broken for
ubuntu-latest/gcc/RelWithDebInfo
on multiple branches. Have not tried it on main but I wouldn't be surprised if it failed. However, it looks like the Github runner has not changed versions; it's something to do with the build process.I compared a working job with a failed job on the same branch and noticed this difference:
Successful:
Failed:
This new version results in this failure: