Closed Bug 451079 Opened 16 years ago Closed 16 years ago

Make setting NULL to an outparam on failure ok

Categories

(Developer Infrastructure :: Source Code Analysis, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: benjamin, Assigned: dmandelin)

Details

Attachments

(4 files, 1 obsolete file)

It turns out that we have lots of code that assumes setting an outparam to NULL on failure is ok. So, rather than try to rewrite the world, I'd like to suppress this class of warning... I have a trivial patch to do that, but it turns out there are some edge cases that need tightening up... I'll attach a testcase shortly.
Attachment #334320 - Flags: review?(dmandelin)
Attachment #334320 - Flags: review?(dmandelin) → review+
This testcase is the fairly common null pattern that needs tweaking. Basically, if you explicitly test the value of the outparam, the state machine should treat is as a NULL-set variable.
Attached patch Patch for onull.cpp test case (obsolete) — Splinter Review
This should take care of it. By the way, e3.cpp should now succeed. Should we just rename it to onull2.cpp and move it to that test category.
Comment on attachment 334353 [details] [diff] [review]
Patch for onull.cpp test case

Looks good. Yes, go ahead and do the file-move, and I think there's an extraneous FLOW_PASS_TESTCASES in the patch.
Attachment #334353 - Flags: review+
Keywords: checkin-needed
Attachment #334353 - Attachment is obsolete: true
pushed to mozilla-central: http://hg.mozilla.org/mozilla-central/index.cgi/rev/3390347493fd
Status: NEW → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You forgot to add/rename the testcases in the previous commit. I've fixed this on mozilla-central with the following commit:

http://hg.mozilla.org/mozilla-central/rev/a4d2e6549f7f
Version: unspecified → Trunk
Product: Core → Firefox Build System
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: