RFR: 8329728: Read arbitrarily long lines in ClassListParser
Ioi Lam
iklam at openjdk.org
Mon Apr 8 04:56:28 UTC 2024
Today the `ClassListParser` has a hard-coded limit of 4096 chars for each line in the CDS class list file. However, it's possible for a line to be much longer than than (64KB for the class name, plus extra information that can include path names, IDs, etc).
I wrote a utility class `LineReader` that automatically allocates a buffer before calling `fgets()`. Hopefully this can be useful for other cases where we call `fgets()` with a fixed buffer size.
-------------
Commit messages:
- 8329728: Read arbitrarily long lines in ClassListParser
Changes: https://git.openjdk.org/jdk/pull/18669/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18669&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8329728
Stats: 235 lines in 5 files changed: 193 ins; 18 del; 24 mod
Patch: https://git.openjdk.org/jdk/pull/18669.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/18669/head:pull/18669
PR: https://git.openjdk.org/jdk/pull/18669
More information about the hotspot-dev
mailing list