Closed Bug 1226557 Opened 9 years ago Closed 9 years ago

[Static Analysis][Called C++ object pointer is null] GetPluginForContentProcess from dom/plugins/base/nsPluginHost.cpp called a C++ object pointer is null

Categories

(Core Graveyard :: Plug-ins, defect)

defect
Not set
normal

Tracking

(firefox45 affected)

RESOLVED INVALID
Tracking Status
firefox45 --- affected

People

(Reporter: andi, Assigned: andi)

References

(Blocks 1 open bug)

Details

(Keywords: clang-analyzer)

Attachments

(2 files)

The Static Analysis tool Scan-Build added a null pointer error in GetPluginForContentProcess from dom/plugins/base/nsPluginHost.cpp, Variable aPlugin is thought to be null when dereferenced.
Attached patch Bug 1226557.diffSplinter Review
Attached patch Bug 1226557.diffSplinter Review
Updated previous version since the last one contained a deleted file.
Comment on attachment 8690031 [details] [diff] [review] Bug 1226557.diff hard-tab nit Whatever scan-build is, this is a false warning and you should fix the analysis tool. In our tree you are allowed to assume that outparams pointers are non-null. Do you have more details about what scan-build is and how you've configured it? So I don't think we should accept this kind of assertion just to silence a buggy tool.
Flags: needinfo?(bogdan.postelnicu)
Scan-Build is a static analyzer tool from llvm that. You can read more here: http://clang-analyzer.llvm.org/scan-build.html Clang version used: Debian clang version 3.8.0-svn252921-1~exp1 (trunk) (based on LLVM 3.8.0) It has been ran with the following arguments: ./mach --log-no-times build -v Honestly i don't think that having an assert will damage the code specially when the asserts are defined only on debug but you know best so it's your call. let me know if you need more info.
Flags: needinfo?(bogdan.postelnicu)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: