RFR: 8320222: Wrong bytecode accepted, and StackMap table generated [v2]
Adam Sotona
asotona at openjdk.org
Mon Nov 20 17:17:15 UTC 2023
> Stack map generator in ClassFile API performs only minimal checks in favour of performance.
> However it led to situations where it generates invalid stack maps for corrupted code.
> This patch adds basic checks of stack when two frames are merged and throws an exception in case of stack size or content mismatch. Generated or transformed code with inconsistent stack will fail on stack maps generation.
> Relevant tests are added.
>
> Please review.
>
> Thanks,
> Adam
Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
changed StackMapGenerator::generatorError to return an exception instead of directly throw
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/16685/files
- new: https://git.openjdk.org/jdk/pull/16685/files/594e4797..3c3ac9be
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=16685&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=16685&range=00-01
Stats: 27 lines in 1 file changed: 0 ins; 0 del; 27 mod
Patch: https://git.openjdk.org/jdk/pull/16685.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16685/head:pull/16685
PR: https://git.openjdk.org/jdk/pull/16685
More information about the core-libs-dev
mailing list