[SERVER-22625] Coverity analysis defect 77716: Explicit null dereferenced Created: 16/Feb/16  Updated: 08/Jan/24  Resolved: 14/Mar/16

Status: Closed
Project: Core Server
Component/s: JavaScript
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Mira Carey
Resolution: Done Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

Dereference of an explicit null value

Defect 77716 (STATIC_C)
Checker FORWARD_NULL (subcategory deref_constant_null)
File: /src/mongo/scripting/mozjs/numberlong.cpp
Function mongo::mozjs::NumberLongInfo::postInstall(JSContext *, JS::Handle<JSObject *>, JS::Handle<JSObject *>)



 Comments   
Comment by Mira Carey [ 14/Mar/16 ]

This is expected. spidermonkey does something fancy to detect the use of temporaries, which involves a null deref if you do it wrong.

Comment by Mira Carey [ 16/Feb/16 ]

Probably, but I don't quite understand what's going on here. That pattern was lifted from a similar piece of code in oid.cpp, not sure what's different about this case.

Comment by Eric Milkie [ 16/Feb/16 ]

Could this be the reason why Waley's change showed those access violations?

Generated at Thu Feb 08 04:00:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.