RFR: 8343140: JfrJavaSupport uses the wrong accessors for sub-int fields
Daniel JeliĆski
djelinski at openjdk.org
Thu Nov 7 13:55:55 UTC 2024
This test fixes the accessor used by `read_boolean_field` to access boolean fields of the `jdk.jfr.internal.dcmd.Argument` record. It also fixes the read accessors for `short` and `char` types, and marks the write accessors for `boolean`, `short` and `char` as unimplemented.
The existing accessor reads the boolean field as int. This results in unaligned access, and probably reads incorrect value on big-endian CPUs.
No new tests. I'm sure a test would be useful, but I have no idea how to write one. Existing tier1-3 tests continue to pass.
-------------
Commit messages:
- Use correct accessors
Changes: https://git.openjdk.org/jdk/pull/21952/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21952&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8343140
Stats: 8 lines in 1 file changed: 8 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/21952.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/21952/head:pull/21952
PR: https://git.openjdk.org/jdk/pull/21952
More information about the hotspot-jfr-dev
mailing list