Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 206815 - Purify UMR in PR_Poll's poll() call
: Purify UMR in PR_Poll's poll() call
Product: NSPR
Classification: Components
Component: NSPR (show other bugs)
: 4.3
: Sun Solaris
: -- normal (vote)
: 4.4.1
Assigned To: Wan-Teh Chang
: Wan-Teh Chang
Depends on:
  Show dependency treegraph
Reported: 2003-05-22 18:15 PDT by Wan-Teh Chang
Modified: 2003-11-26 16:48 PST (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Proposed patch for NSPR TIP (1.17 KB, patch)
2003-05-22 18:16 PDT, Wan-Teh Chang
kirk.erickson: review+
Details | Diff | Splinter Review
Proposed patch for NSPR 4.1 branch (1.13 KB, patch)
2003-05-22 18:20 PDT, Wan-Teh Chang
no flags Details | Diff | Splinter Review

Description Wan-Teh Chang 2003-05-22 18:15:28 PDT
In the PR_Poll implementation based on poll(), if a
PRPollDesc structure's fd field is NULL, we set the
corresponding pollfd structure's fd field to -1, but
we do not initialize its events field.  This is fine
because the poll man page says the events field is
ignored if the fd field is negative.  However,
apparently poll still reads the events field (at least
on Solaris), resulting in a UMR reported by Purify.
Comment 1 Wan-Teh Chang 2003-05-22 18:16:40 PDT
Created attachment 124023 [details] [diff] [review]
Proposed patch for NSPR TIP

Set the events field of a pollfd structure to 0 if we
set the fd field to -1.
Comment 2 Wan-Teh Chang 2003-05-22 18:20:43 PDT
Created attachment 124025 [details] [diff] [review]
Proposed patch for NSPR 4.1 branch

Same fix for the NSPR 4.1 branch.
Comment 3 Wan-Teh Chang 2003-05-22 18:23:55 PDT
Comment on attachment 124025 [details] [diff] [review]
Proposed patch for NSPR 4.1 branch

Please ask your internal customer to test this patch
and see if it eliminates the UMR in PR_Poll.
Comment 4 Kirk Erickson 2003-05-22 21:31:18 PDT
Comment on attachment 124023 [details] [diff] [review]
Proposed patch for NSPR TIP

Looks good.
Comment 5 Kirk Erickson 2003-05-22 22:03:40 PDT
I'll create binaries and try contacting Fred Batty at Sun.

I greped for PR_Poll and found that indeed selfserv doesn't
call, but sslstrength and ssltap may.  Perhaps I can reproduce
with one of these in the meantime.

Comment 6 Kirk Erickson 2003-06-09 02:13:21 PDT
This from Fred:

Hi, I have a lot of urgent work right now and probably won't be able to
verify this for several weeks. Why don't you go ahead and check in the fix,
and I'll mark the bug verified when I've had a chance to verify it. Thx
Comment 7 Wan-Teh Chang 2003-11-26 16:48:59 PST
Fixed on the NSPR tip (NSPR 4.4.1).

Note You need to log in before you can comment on or make changes to this bug.