Skip to content

Commit

Permalink
[GR-31457] Invalid assumption in LLVMContext.getSymbol.
Browse files Browse the repository at this point in the history
PullRequest: graal/8982
  • Loading branch information
Palez committed May 20, 2021
2 parents aa2f6e8 + 87849e2 commit 3ec3ea3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ public LLVMPointer getSymbol(LLVMSymbol symbol) {
BitcodeID bitcodeID = symbol.getBitcodeID(false);
int id = bitcodeID.getId();
int index = symbol.getSymbolIndex(false);
if (CompilerDirectives.inCompiledCode() && CompilerDirectives.isPartialEvaluationConstant(this)) {
if (CompilerDirectives.inCompiledCode() && CompilerDirectives.isPartialEvaluationConstant(this) && CompilerDirectives.isPartialEvaluationConstant(symbol)) {
if (!symbolAssumptions[id][index].isValid()) {
CompilerDirectives.transferToInterpreterAndInvalidate();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2020, Oracle and/or its affiliates.
* Copyright (c) 2016, 2021, Oracle and/or its affiliates.
*
* All rights reserved.
*
Expand Down Expand Up @@ -60,10 +60,10 @@ public abstract class AggregateLiteralInPlaceNode extends LLVMStatementNode {
private static final ByteArraySupport byteSupport = ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN ? ByteArraySupport.bigEndian() : ByteArraySupport.littleEndian();

/**
* This node initializes a block of memory with a with combination of raw bytes and explicit
* store nodes. When executed, it transfers all bytes from {@code data} to the target (using i8
* and i64 stores as appropriate), except for those covered by a node in {@code stores}. Every
* store node has a corresponding entry in {@code offsets} and {@sizes}.
* This node initializes a block of memory with a combination of raw bytes and explicit store
* nodes. When executed, it transfers all bytes from {@code data} to the target (using i8 and
* i64 stores as appropriate), except for those covered by a node in {@code stores}. Every store
* node has a corresponding entry in {@code offsets} and {@sizes}.
*/
public AggregateLiteralInPlaceNode(byte[] data, LLVMOffsetStoreNode[] stores, int[] offsets, int[] sizes, int[] bufferOffsets, LLVMGlobal[] descriptors) {
assert offsets.length == stores.length + 1 && stores.length == sizes.length;
Expand Down

0 comments on commit 3ec3ea3

Please sign in to comment.