JDK-8159695 : Arguments::atojulong() fails to detect overflows
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-06-16
  • Updated: 2024-07-09
  • Resolved: 2016-06-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b128Fixed
Related Reports
Blocks :  
Description
atojulong doesn't detect when the parsed number is too large to fit in a julong. It silently accepts numbers such as 999999999999999999999999999999.
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk8u-dev/pull/428 Date: 2024-01-25 05:57:35 +0000
09-07-2024

[jdk8u-fix-request] Approval Request from ktakakuri Fix Request 8u This bug is reproducible in JDK8, and backporting this patch is needed. The patch does not apply cleanly, with GTest and hexadecimal-related lines being dropped. Low risk as it only relates to edge cases of the string-julong conversion. For building in Windows x86, the appropriate macro definition is needed and the correspoding backport has been submitted. Tesing: GHA, hotspot_tier1, and manually check the behaviour.
16-04-2024

URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/2af3fb9f244f User: amurillo Date: 2016-07-20 16:26:26 +0000
20-07-2016

URL: http://hg.openjdk.java.net/jdk9/hs/hotspot/rev/2af3fb9f244f User: mlarsson Date: 2016-06-30 08:28:23 +0000
30-06-2016

sscanf doesn't do range checking. We should use strtoll instead.
16-06-2016