Skip to content

Commit b7fdba0

Browse files
committed
[MERGE #4684 @MikeHolman] fix assert in JIT data serialization
Merge pull request #4684 from MikeHolman:serializedassert We may have multiple codegen calls for same entrypoint, so replace the old JIT data if this happens OS: 15845157
2 parents b7b4da8 + e1049e5 commit b7fdba0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/Runtime/Base/FunctionBody.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,12 @@ namespace Js
437437
public:
438438
void SetSerializedRpcData(const unsigned char* data, size_t size)
439439
{
440-
Assert(serializedRpcData == nullptr);
440+
if (this->serializedRpcData != nullptr)
441+
{
442+
// We may have multiple codegens happen for same entrypoint
443+
const unsigned char* rpcData = this->serializedRpcData;
444+
HeapDeleteArray(this->serializedRpcDataSize, rpcData);
445+
}
441446
serializedRpcData = data;
442447
serializedRpcDataSize = size;
443448
}

0 commit comments

Comments
 (0)