forked from openjdk/valhalla
-
Notifications
You must be signed in to change notification settings - Fork 0
8374016: [lworld] Too late checked_cast in ResolvedFieldEntry::set_flags #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…configured with a higher idle timeout Reviewed-by: dfuchs
Reviewed-by: alanb, rriggs
…ssDeniedException Reviewed-by: sgehwolf, shade
Reviewed-by: serb, azvegint, prr
…tructions Reviewed-by: sviswanathan, dlunden, vlivanov, qamai
Reviewed-by: chagedorn, mbaesken
Reviewed-by: kbarrett, stefank
Reviewed-by: epeter, syan, dfenacci
…etaspace.java fail after recent improvements Reviewed-by: stuefe, azeller, lucy
… SkippedException Reviewed-by: rhalade
Reviewed-by: kbarrett, sjohanss
Reviewed-by: aph, haosun
…on x64 Reviewed-by: lucy, goetz
Reviewed-by: iwalulya, sjohanss
…tures Reviewed-by: djelinski, abarashev
…va timed out during warmup Reviewed-by: djelinski
…r_null Reviewed-by: dholmes, never, jsjolen
Reviewed-by: lucy, azeller
Reviewed-by: ysr, xpeng
…it fails when the directory already exists Reviewed-by: alanb, jpai
… cause AES-GCM encryption failure for certain payload sizes Co-authored-by: Thomas Holenstein <tholenst@google.com> Co-authored-by: Lukas Zobernig <zlukas@google.com> Reviewed-by: shade, sviswanathan
Reviewed-by: liach, jpai
… after JDK-8371667 Reviewed-by: wkemper, kdnilsen, ysr
…erError Reviewed-by: lmesnik, aboldtch
Reviewed-by: liach
…ore is_init_completed Reviewed-by: ayang, sjohanss, eosterlund
…e is_init_completed Reviewed-by: ayang, sjohanss, eosterlund
…ble constraint Reviewed-by: mdoerr, stefank, tschatzl, sjohanss
…t empty tasks Reviewed-by: vklang
…ngQuicPacket subclasses Reviewed-by: jpai, dfuchs
Reviewed-by: rriggs
Reviewed-by: coleenp, stefank, dcubed
Reviewed-by: stefank, phubner
…K-8371357 Reviewed-by: rriggs
Reviewed-by: phubner, fparain
…strict instance fields Reviewed-by: mcimadamore
Reviewed-by: coleenp, fparain
Reviewed-by: rriggs
….java Reviewed-by: chagedorn, phubner
…nsistent state Reviewed-by: chagedorn
Reviewed-by: fparain, stefank
Reviewed-by: coleenp
8373828: [lworld] Test CheckExamples fails since jimage change Reviewed-by: rriggs
Reviewed-by: liach
Reviewed-by: chagedorn, mhaessig
Reviewed-by: thartmann
Reviewed-by: aboldtch, stefank, phubner
Reviewed-by: fparain, coleenp
…est.java fails Reviewed-by: rriggs
…ava fails with --enable-preview Reviewed-by: iklam
Reviewed-by: liach, rriggs
…h --enable-preview 8373596: [lworld] Various CDS crashes due to assert(_heap_load_mode != HeapArchiveMode::_uninitialized) failed: not initialized yet 8372743: [lworld] jdk/internal/misc/CDS/ArchivedEnumTest.java fails with --enable-preview 8372607: [lworld] runtime/cds/SharedStringsDedup.java fails with --enable-preview 8372606: [lworld] runtime/cds/SharedStringsRunAuto.java fails with --enable-preview 8372265: [lworld] HelloInlineClassApp "Static field rectangle not as expected" 8371456: [lworld] ResolvedConstants.java fails since jdk-26+22 Reviewed-by: coleenp
Owner
Author
|
This was supposed to go to openjdk/valhalla/lworld not stefank/valhalla/lworld |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the lworld branch the
new_flagstype has been changed to u1 instead of int. We now perform a bunch of bit operations, which results in an int, and then we narrow that down into a u1. After the u1 has been created we check that this doesn't overflow a u1 with the checked_cast check. That's too late.Mainline code looks like this:
and Valhalla code looks like this:
This voids the benefit of having a checked_cast here. I propose that we revert back to using
int new_flagsand keep the checked_cast.While reading this code there were a few things that made the code harder to follow and I've tweaked it.
boolis_volatile_shiftis special-treated and instead of shifting it is directly casted to int. That hard codes a knowledge/assumption that the flag is always going to be 1 (and maybe also what value bools have).That made me have to look at the actual values of these and at one point I thought that is_volatile_shift was
1and not0and that the above was a bug. The main reason I thought that was this odd order here:Here the order of usage is
but the enum order has final and volatile swapped:
I'd prefer if we stayed consistent with the order, to lower the risk that some bugs sneak in here. So, I've replaced the cast with a shift (just like the other values are handled) and I ordered functions, parameters, and operations in the same order as the enums.
Please tell me if I went to far with the style changes.