-
Type:
Enhancement
-
Resolution: Unresolved
-
Priority:
P4
-
None
-
Affects Version/s: None
-
Component/s: core-libs
-
None
There are some rare cases where functions like `strtol`, `strtoul`, and `strtod` (libc functions) rely on resetting the `errno` to detect overflow/underflow via `errno == ERANGE`.
It seems like a good enhancement to implement this as:
A) Just before the call: copy the contents of the errno buffer to the thread's `errno` (and potentially other states)
B) Invoke the call
C) Just after the call: copy the thread's `errno` into the errno buffer
See https://mail.openjdk.org/pipermail/panama-dev/2026-February/021295.html
It seems like a good enhancement to implement this as:
A) Just before the call: copy the contents of the errno buffer to the thread's `errno` (and potentially other states)
B) Invoke the call
C) Just after the call: copy the thread's `errno` into the errno buffer
See https://mail.openjdk.org/pipermail/panama-dev/2026-February/021295.html