Closed Bug 1321875 Opened 8 years ago Closed 8 years ago

Fix relative lifetimes of lpAttributeList and handlesToInherit in LaunchApp

Categories

(Core :: IPC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: away, Assigned: away)

References

Details

Attachments

(1 file)

CreateThreadAttributeList warns:

// Note that the pointer to the HANDLE array ends up embedded in the result of
// this function and must stay alive until FreeThreadAttributeList is called,
// hence it is passed in so the owner is the caller of this function.

but the caller was passing a |handlesToInherit| that was declared inside a block scope that ends before we're finished using lpAttributeList.

This happened to work on MSVC but leads to badness under clang-cl.
Attached patch handlesSplinter Review
Attachment #8816551 - Flags: review?(nfroyd)
Doh! Yeah, I've been bitten before by that, too!
Attachment #8816551 - Flags: review?(nfroyd) → review+
Comment on attachment 8816551 [details] [diff] [review]
handles

Review of attachment 8816551 [details] [diff] [review]:
-----------------------------------------------------------------

Nice catch.  Wonder if MSVC is silently helping by initializing things to zero or something.
Pushed by dmajor@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/72cd631fdd79
Fix relative lifetimes of lpAttributeList and handlesToInherit in LaunchApp. r=aklotz
https://hg.mozilla.org/mozilla-central/rev/72cd631fdd79
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: