Closed Bug 82436 Opened 23 years ago Closed 23 years ago

assertion needed in PR_Lock

Categories

(NSPR :: NSPR, defect, P3)

4.0.2
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Brade, Assigned: wtc)

References

()

Details

Attachments

(1 file)

I was running the mozilla client on NT earlier today and ran into a problem when 
I crashed in PR_Lock because it had been passed a null lock as its parameter.

I think that PR_Lock should assert when it is passed a null lock (rather than 
crashing later (PR_ASSERT(lock->owner != me);) when lock is dereferenced.

This could be fixed by changing the above assertion(s) to something like:
  PR_ASSERT(lock && lock->owner != me);
or by adding a new line near the top (something like):
  PR_ASSERT(lock);
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → 4.2
Attached patch Proposed patch.Splinter Review
Fixed on the trunk of NSPR.  I assert that lock is not NULL
in PR_Unlock as well.

Mozilla client won't pick up this change until it switches
to NSPR 4.2.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Version: 3.1 → 4.0.2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: