Skip to content

Commit

Permalink
[GR-61724] Improve context sensitivity of AccessController#doPriviled…
Browse files Browse the repository at this point in the history
…ge in language permission tool.

PullRequest: graal/19939
  • Loading branch information
tzezula committed Jan 31, 2025
2 parents 86b6d9f + b7c8bbf commit 1b5e415
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ JavaArgs = --add-exports org.graalvm.nativeimage.base/com.oracle.svm.util=ALL-UN
--add-exports jdk.graal.compiler/jdk.graal.compiler.nodes=ALL-UNNAMED \
--add-exports jdk.graal.compiler/jdk.graal.compiler.nodes.java=ALL-UNNAMED \
--add-exports=jdk.graal.compiler/jdk.graal.compiler.nodes.spi=ALL-UNNAMED \
--add-exports=jdk.graal.compiler/jdk.graal.compiler.nodes.virtual=ALL-UNNAMED \
--add-exports jdk.graal.compiler/jdk.graal.compiler.options=ALL-UNNAMED \
--add-exports org.graalvm.truffle.runtime/com.oracle.truffle.runtime=ALL-UNNAMED \
--add-exports jdk.graal.compiler/jdk.graal.compiler.util.json=ALL-UNNAMED \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@

import com.oracle.svm.hosted.code.FactoryMethod;
import com.oracle.svm.util.LogUtils;
import jdk.graal.compiler.nodes.virtual.AllocatedObjectNode;
import org.graalvm.nativeimage.ImageSingletons;
import org.graalvm.nativeimage.hosted.Feature;
import org.graalvm.polyglot.io.FileSystem;
Expand Down Expand Up @@ -837,6 +838,8 @@ public boolean test(BaseMethodNode methodNode, BaseMethodNode callerNode, List<B
if (targetMethod.wrapped instanceof FactoryMethod factoryMethod) {
newType = method.getUniverse().lookup(factoryMethod.getTargetConstructor().getDeclaringClass());
}
} else if (arg0 instanceof AllocatedObjectNode allocatedObjectNode) {
newType = allocatedObjectNode.getVirtualObject().type();
}
if (newType == null) {
return false;
Expand Down

0 comments on commit 1b5e415

Please sign in to comment.