mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
92c5bff388
The function given to XRE_LibFuzzerSetMain is called from somewhere that does have access to argc/argv already, so we can avoid passing them to XRE_LibFuzzerSetMain. This actually might fix subtle issues with argc/argv not really matching reality when calling the LibFuzzerMain function in the current code: some arguments are handled before the call, and both argc and argv are modified from within XRE_main, but the values stored for the LibFuzzerMain call still are the original ones. Argv being a pointer, and it not being reallocated, the value stored for the LibFuzzerMain call points to the changed one, but argc, being an integer, is not modified accordingly. In fact, it's actually worse, because while the Gecko code doesn't reallocate argv, gtk_main might. So if some GTK flag is passed on the command line, there's also a possibility that the LibFuzzerMain function will do a use-after-free. So all in all, it's just better to use the set of modified argc/argv from XRE_main instead of storing them from main(). --HG-- extra : rebase_source : 92b89909eab0fc2f67ce372b959bb0e3ed12cd2b |
||
---|---|---|
.. | ||
BinaryPath.h | ||
FileLocation.cpp | ||
FileLocation.h | ||
IOInterposer.cpp | ||
IOInterposer.h | ||
IOInterposerPrivate.h | ||
LateWriteChecks.cpp | ||
LateWriteChecks.h | ||
mach_override.c | ||
mach_override.h | ||
MainThreadIOLogger.cpp | ||
MainThreadIOLogger.h | ||
moz.build | ||
NSPRInterposer.cpp | ||
NSPRInterposer.h | ||
nsWindowsDllInterceptor.h | ||
nsXPCOM.h | ||
nsXPCOMCID.h | ||
nsXPCOMCIDInternal.h | ||
nsXPCOMPrivate.h | ||
nsXPCOMStrings.cpp | ||
nsXULAppAPI.h | ||
Omnijar.cpp | ||
Omnijar.h | ||
perfprobe.cpp | ||
perfprobe.h | ||
PoisonIOInterposer.h | ||
PoisonIOInterposerBase.cpp | ||
PoisonIOInterposerMac.cpp | ||
PoisonIOInterposerStub.cpp | ||
PoisonIOInterposerWin.cpp | ||
ServiceList.h | ||
Services.cpp | ||
Services.h | ||
xpcom_alpha.def | ||
XPCOM.h | ||
XPCOMInit.cpp | ||
XPCOMModule.inc | ||
XREAppData.h | ||
XREChildData.h | ||
xrecore.h | ||
XREShellData.h |