Closed
Bug 991341
Opened 11 years ago
Closed 11 years ago
CID 1122021: OdinMonkey: Unchecked return value in jit/AsmJSSignalHandlers.cpp as found by Coverity
Categories
(Core :: JavaScript Engine: JIT, defect)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
INVALID
People
(Reporter: gkw, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: coverity)
Coverity analysis of source code in js/src has found an Unchecked return value issue.
________________________________________________________________________________________________________
*** CID 1122021: Unchecked return value (CHECKED_RETURN)
/js/src/jit/AsmJSSignalHandlers.cpp: 910 in HandleSignal(int, siginfo *, void *)()
904 return false;
905
906 // If we faulted trying to execute code in 'module', this must be an
907 // operation callback (see TriggerOperationCallbackForAsmJSCode). Redirect
908 // execution to a trampoline which will call js_HandleExecutionInterrupt.
909 // The trampoline will jump to activation->resumePC if execution isn't
>>> CID 1122021: Unchecked return value (CHECKED_RETURN)
>>> No check of the return value of "mprotect(module->codeBase(), module->functionBytes(), 4)".
910 // interrupted.
911 if (module.containsPC(faultingAddress)) {
912 activation->setResumePC(pc);
913 *ppc = module.operationCallbackExit();
914
915 JSRuntime::AutoLockForOperationCallback lock(rt);
Benjamin, how shall we move forward here?
Flags: needinfo?(benj)
![]() |
||
Comment 1•11 years ago
|
||
The only thing to do if mprotect() fails in these cases is to MOZ_CRASH() (that is what is currently done on tip, I guess you're scanning an old cset). However, even in the older versions, if the mprotect fails, then we'll still crash since the code was not made executable, so I'm not sure there is anything to do here.
Flags: needinfo?(benj)
![]() |
Reporter | |
Comment 2•11 years ago
|
||
OK, let's resolve INVALID then.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
![]() |
Reporter | |
Updated•11 years ago
|
Summary: OdinMonkey: Unchecked return value in jit/AsmJSSignalHandlers.cpp as found by Coverity → CID 1122021: OdinMonkey: Unchecked return value in jit/AsmJSSignalHandlers.cpp as found by Coverity
Updated•7 years ago
|
Blocks: coverity-analysis
You need to log in
before you can comment on or make changes to this bug.
Description
•