Closed Bug 1944914 Opened 1 year ago Closed 1 year ago

SOCK_CLOEXEC is misspelled in an ifdef in ForkServiceChild.cpp

Categories

(Core :: IPC, defect)

Desktop
Linux
defect

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox134 --- wontfix
firefox135 --- wontfix
firefox136 --- fixed

People

(Reporter: jld, Assigned: jld)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

The patch for bug 1858272 had a typo in an ifdef, misspelling SOCK_CLOEXEC as SOCK_CLOXEC, so the condition was never true for that ifdef, but was for others. The result was that the close-on-exec flag is never set on those sockets. This isn't a huge bug — Necko still doesn't set close-on-exec, for example, and in general our approach is to ensure that all unwanted fds are explicitly closed for process spawning in our code — but it's a bug.

Set release status flags based on info from the regressing bug 1858272

This typo was missed during review, and then I happened to notice it
myself before landing, and… somehow forgot to fix it. The impact is
that we won't use SOCK_CLOEXEC when creating the socketpair, but we
also won't set FD_CLOEXEC non-atomically either, because the other
ifdefs are spelled correctly.

It would be nice to have a regression test for this, given how easy it
was for several people to repeatedly miss it, but there isn't a good way
to do that because this is an internal implementation detail.

Pushed by jedavis@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6a65533b2d91 Fix ifdef typo (missing E in `SOCK_CLOEXEC`). r=ipc-reviewers,mccr8
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: