Skip to content

Fix checkByteArrayIllegal loop condition in ObjectState#13231

Open
cuiweixie wants to merge 1 commit intooracle:masterfrom
cuiweixie:fix/ObjectState-checkByteArrayIllegal-loop-index
Open

Fix checkByteArrayIllegal loop condition in ObjectState#13231
cuiweixie wants to merge 1 commit intooracle:masterfrom
cuiweixie:fix/ObjectState-checkByteArrayIllegal-loop-index

Conversation

@cuiweixie
Copy link
Copy Markdown

Summary

Fixes the loop in ObjectState.checkByteArrayIllegal that skips trailing illegal constants after a primitive in a byte array. The loop variable is j, but the condition incorrectly used values[i], so the loop did not advance correctly when multiple illegal slots follow the primitive.

Testing

  • Compiler change only; assertion logic fix aligned with existing comments (totalBytes / stamps caveat).

The loop advances j to skip trailing illegal constants but compared
values[i] instead of values[j], so the termination condition was wrong
when multiple illegal slots follow the primitive.
@oracle-contributor-agreement
Copy link
Copy Markdown

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
The following contributors of this PR have not signed the OCA:

To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.

When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.

If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. label Mar 28, 2026
@thomaswue thomaswue self-assigned this Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Required At least one contributor does not have an approved Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants