Comments (8)
Hi @breun - I'm not sure I fully agree with that assessment because the code is taking the values returned by staticFieldBase
and staticFieldOffset
and passing them into unsafe.getObject
which is allowed (and intended) according to the Unsafe
javadoc:
* <li>The offset and object reference {@code o} (either null or
* non-null) were both obtained via {@link #staticFieldOffset}
* and {@link #staticFieldBase} (respectively) from the
* reflective {@link Field} representation of some Java field.
But I agree that we're not doing that directly though because of the use of the reflective call, and it appears that Azul Prime is doing something different when reflection is involved.
I believe we can simplify that call to avoid using the value from staticFieldBase
because we know that field is a member of Lookup.class
- according to the javadoc we can use Lookup.class
directly, which should hopefully avoid the issue on Azul Prime:
Lookup trustedLookup =
(Lookup) GET_OBJECT_METHOD.invoke(THE_UNSAFE, Lookup.class, TRUSTED_LOOKUP_OFFSET);
I'll try to recreate the original issue to verify this fix.
from guice.
@breun PR #1673 has a potential fix - could you build this locally and try it out with your Azul Prime setup?
from guice.
@mcculls I've tried building your branch locally and I believe I need to use Bazel, which I've installed, but I haven't figured out yet what command I need to run to build Guice. Can you tell me how to build Guice or point me to documentation for this?
from guice.
from guice.
I was able to install Guice 5.1.1-SNAPSHOT from your branch, but the next step is building Maven 3.9.1 with this version of Guice, but I various tests fail when building Maven 3.9.1 with Guice 5.1.1-SNAPSHOT due to java.lang.NoSuchMethodError: com.google.common.collect.ImmutableMap$Builder.buildOrThrow()Lcom/google/common/collect/ImmutableMap;
. Any ideas? I can build Maven 3.9.1 with Guice 5.1.0 without problems.
from guice.
from guice.
Hi @mcculls we at Azul have a change for this issue which we prefer to the one you proposed. I believe we're waiting for Google to approve the paperwork we've submitted that's required to join the project. Is there someone who can help expedite the application?
from guice.
@azul-jf: Please open a pull request with your proposed change and we can discuss it there. The automated CLA checks will kick in when the PR is open. It looks like Azul already has a corp CLA agreement AFAICT, so so long as the author of the PR is a member of Azul's CLA, it should just work.
from guice.
Related Issues (20)
- Can I have more than one aspect for a method and if yes how to ensure order of them with Guice AOP
- Spark2.4.7,Guice:4.0: java.lang.ArrayIndexOutOfBoundsException: 67737
- Deadlock in multi-threading enviroment (Guice 5.1)
- enable @Inject for records HOT 4
- InternalProvisionException.errorInUserCode discards important context about user errors HOT 1
- Annotations @Provides and @Singleton do not work together HOT 2
- Bob Lee,God bless You
- Feature Request: MicroProfile-config integration: Allow injecting annotations with jakarta.inject.Qualifier HOT 12
- where are the installation instructions? HOT 4
- java.lang.ClassCastException: class com.google.inject.servlet.GuiceFilter cannot be cast to class jakarta.servlet.Filter (com.google.inject.servlet.GuiceFilter is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @e383572; jakarta.servlet.Filter is in unnamed module of loader java.net.URLClassLoader @2ef1e4fa) HOT 1
- Changed behaviour in Guice 7 HOT 3
- Struts 6.x.x not working with Guice HOT 9
- Possible leak using Guice HOT 5
- Performance Issue in getJustInTimeBinding Method HOT 1
- Misleading exception message for nested Guice injector failure
- 8 Flaky tests in the module extensions/throwingproviders
- Request/Question: Provide non-jarjar'd builds
- Guice AOP is not compatible with Kotlin Coroutines HOT 2
- Enable to define a custom "@Inject" marker (ie add some extension point for reflection doing getAnnotation/isAnnotationPresent on this marker)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from guice.