Closed Bug 469508 Opened 16 years ago Closed 16 years ago

In prlink.c, errStrBuf is not thread-safe.

Categories

(NSPR :: NSPR, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wtc, Assigned: wtc)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Proposed patch (obsolete) (deleted) — Splinter Review
prlink.c has a global string buffer 'errStrBuf'. The way we allocate and use 'errStrBuf' is not thread-safe. 'errStrBuf' should be defined as a local variable in DLLErrorInternal: char errStrBuf[ERR_STR_BUF_LENGTH]; and passed to errno_string().
Attached patch Proposed patch v2 (deleted) — Splinter Review
errno_string is only used by DLLErrorInternal and would become a two-liner. We should just inline errno_string.
Attachment #352871 - Attachment is obsolete: true
Attachment #352872 - Flags: review?(julien.pierre.boogz)
Attachment #352872 - Flags: review?(julien.pierre.boogz) → review+
I checked in the patch on the NSPR trunk (NSPR 4.7.4). Checking in prlink.c; /cvsroot/mozilla/nsprpub/pr/src/linking/prlink.c,v <-- prlink.c new revision: 3.95; previous revision: 3.94 done
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.7.4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: