-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
move dynamic interpreter thunk generation OOP #1707
Conversation
|
||
if (!emitBufferManager->ProtectBufferWithExecuteReadWriteForInterpreter(allocation)) | ||
{ | ||
Js::Throw::JITOperationFailed(GetLastError()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Js::Throw::JITOperationFailed(GetLastError()); [](start = 12, length = 46)
don't need this. VirtualProtectEx call failure has been checked right after the call. if it's not system call failure, there's fail fast, also the last error will be meaningless
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true, then I guess we should be able to assert that this call succeeds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this call should never never return false, if we reach here and get a false return, I think it means we missed a path that we should fail fast. you can double check with Satheesh
In reply to: 82306816 [](ancestors = 82306816)
can you fix the memory leak here, I missed this in my change Refers to: lib/Common/Memory/MemUtils.cpp:45 in 2863255. [](commit_id = 2863255, deletion_comment = False) |
542f0e6
to
9adef24
Compare
Js::Throw::FatalInternalError(); | ||
} | ||
} | ||
if (byteCount % 2 != 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (byteCount % 2 != 0) [](start = 11, length = 24)
you might want to move this before the for loop to avoid out of bounds write.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i changed this to use different algorithm instead that doesn't need to use heap.
Js::Throw::JITOperationFailed(GetLastError()); | ||
} | ||
|
||
success = emitBufferManager->CommitReadWriteBufferForInterpreter(allocation, remoteBuffer, bufferSize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CommitReadWriteBufferForInterpreter [](start = 37, length = 35)
you might want to add JITOperationFailed in the false path for this API. It will return false, when the protection is unsuccessful - which can happen with the CFG around -
Looks good, otherwise. |
2387c62
to
5e5099f
Compare
Merge pull request #1707 from MikeHolman:oopite
No description provided.