Skip to content

Prevent DDR code crash on reading garbage - #21576

Merged
amicic merged 1 commit into
eclipse-openj9:masterfrom
dmitripivkine:master
Apr 4, 2025
Merged

Prevent DDR code crash on reading garbage#21576
amicic merged 1 commit into
eclipse-openj9:masterfrom
dmitripivkine:master

Conversation

@dmitripivkine

Copy link
Copy Markdown
Contributor

Currently Check Engine code failed at attempt to read class data if it is unexpected garbage.

Currently Check Engine code failed at attempt to read class data if it
is unexpected garbage.

Signed-off-by: Dmitri Pivkine <Dmitri_Pivkine@ca.ibm.com>
@amicic

amicic commented Apr 4, 2025

Copy link
Copy Markdown
Contributor

jenkins compile aix jdk21

@amicic
amicic merged commit d08eac4 into eclipse-openj9:master Apr 4, 2025

// Short circuit if we've recently checked this class.
int cacheIndex = (int) (clazz.longValue() % CLASS_CACHE_SIZE);
int cacheIndex = new UDATA(clazz.longValue()).mod(CLASS_CACHE_SIZE).intValue();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A more concise expression would be UDATA.cast(clazz).mod(CLASS_CACHE_SIZE).intValue().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants