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
[CVE-2018-0818] Add ProcessContexts for OOP JIT #4427
Conversation
lib/JITServer/JITServer.cpp
Outdated
ServerContextManager::RegisterThreadContext(contextInfo); | ||
} | ||
catch (Js::OutOfMemoryException) | ||
{ | ||
CloseHandle(targetHandle); | ||
if (!contextInfo) |
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.
contextInfo [](start = 13, length = 11)
if there's OOM after HeapNew, we should free contextInfo
if it's not possible to OOM after HeapNew, the we don't need the check here
lib/JITServer/JITServer.cpp
Outdated
ProcessContexts.Add(pid, context); | ||
} | ||
catch (Js::OutOfMemoryException) | ||
{ |
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.
need to free context if OOM in ProcessContexts.Add()
lib/JITServer/JITServer.cpp
Outdated
{ | ||
ProcessContext* context = iter.CurrentValue(); | ||
// We can delete a ProcessContext if no ThreadContexts refer to it and the process is terminated | ||
if (!context->HasRef() && WaitForSingleObject(context->processHandle, 0) != WAIT_TIMEOUT) |
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.
WAIT_TIMEOUT [](start = 84, length = 12)
use WAIT_OBJECT_0 instead? other than time out, wait function can have other failure
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.
Merge pull request #4427 from MikeHolman:oopprocessinit Adds early handshake to pass in runtime process addresses, with the assurance that this handshake is only done once per runtime process. OS:14980597
Merge pull request #4427 from MikeHolman:oopprocessinit Adds early handshake to pass in runtime process addresses, with the assurance that this handshake is only done once per runtime process. OS:14980597
Adds early handshake to pass in runtime process addresses, with the assurance that this handshake is only done once per runtime process.
OS:14980597