Skip to content

fix cp_infos_from_context() - #3

Merged
zsqw123 merged 1 commit into
zsqw123:masterfrom
zaits07:master
Sep 18, 2026
Merged

zsqw123 merged 1 commit into
zsqw123:masterfrom
zaits07:master

Conversation

@zaits07

@zaits07 zaits07 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

while reading constant pool we should skip one index in result after long and double constants. i.e. we shoud add dummy const after long or double constant;

index after long and double reserved: [https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.4.5]

existing code properly descrease max_len, but not change result
indexes after long or double constant became wrong

while reading constant pool we should skip one index in result after long and double constants.
i.e. we shoud add dummy const after long or double constant;

index after long and double reserved: https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.4.5
@zsqw123

zsqw123 commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Thanks! That's a truly bug, I think I have some misunderstandings about this JVMS specification. When I have time (maybe this weekend), I will add some related unit tests to ensure that these things can be work corrected.

@zsqw123
zsqw123 merged commit c4bba87 into zsqw123:master Sep 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants