On Thu, 16 Nov 2023 10:00:44 GMT, Adam Sotona <asot...@openjdk.org> wrote:

> 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

This pull request has now been integrated.

Changeset: c4aee66d
Author:    Adam Sotona <asot...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/c4aee66d742008848e5b5bc8ce3b2e3032a39bc3
Stats:     74 lines in 2 files changed: 46 ins; 0 del; 28 mod

8320222: Wrong bytecode accepted, and StackMap table generated

Reviewed-by: jlahoda

-------------

PR: https://git.openjdk.org/jdk/pull/16685

Reply via email to