You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 28, 2023. It is now read-only.
I'm screwing around with /analyze, and it's picked up a couple of issues for AppJailLauncher. Good software development on your part means this bug won't cause any bad behavior, but you might be confused if you're debugging.
At line 344 in utils.cpp you check the return value of CreateJobObject against INVALID_HANDLE_VALUE:
hJob = CreateJobObject(NULL, NULL);
W32_ASSERT(hJob != INVALID_HANDLE_VALUE, Exit);
LOG("New job object created with handle %016p\n", hJob);
...but the docs sayCreateJobObject returns NULL on failure:
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
When CreateJobObject fails and you don't catch it here, it's not a big deal, because SetInformationJobObject should also fail. Because you properly check that return value, CreateLimitProcessTimeJobObject then returns E_FAIL, and the program exits with -1.