Closed Bug 502961 Opened 12 years ago Closed 12 years ago

Allocator mismatch in pk11mode

Categories

(NSS :: Tools, defect, P2)

3.12.3
defect

Tracking

(Not tracked)

RESOLVED FIXED
3.12.4

People

(Reporter: julien.pierre, Assigned: julien.pierre)

Details

Attachments

(1 file, 1 obsolete file)

I have been running all.sh with NSPR and NSS built with different allocators on Windows - one built with the standard allocator, the other with the debug allocator.

I found the following problem :

 	ntdll.dll!7d6354be() 	
 	ntdll.dll!7d61ea56() 	
 	msvcr90d.dll!_free_dbg(void * pUserData=0x01ea6d40, int nBlockUse=1)  Line 1258 + 0xd bytes	C++
 	msvcr90d.dll!free(void * pUserData=0x01ea6d40)  Line 49 + 0xb bytes	C++
>	pk11mode.exe!main(int argc=7, char * * argv=0x01eb3200)  Line 783 + 0xd bytes	C
 	pk11mode.exe!__tmainCRTStartup()  Line 586 + 0x19 bytes	C
 	pk11mode.exe!mainCRTStartup()  Line 403	C

Patch forthcoming.
Attached patch Free moduleSpec with PR_Free (obsolete) — Splinter Review
Attachment #387322 - Flags: review?(nelson)
Priority: -- → P2
Target Milestone: --- → 3.12.5
Comment on attachment 387322 [details] [diff] [review]
Free moduleSpec with PR_Free

The correct function for freeing memory allocated by PR_smprintf is 
PR_smprintf_free.  See
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/nsprpub/pr/include/prprf.h&rev=3.6&mark=73-74#71
Attachment #387322 - Flags: review?(nelson) → review-
Attached patch updated patchSplinter Review
You are right, though, PR_smprintf_free just calls PR_DELETE which calls PR_Free .
Attachment #387322 - Attachment is obsolete: true
Attachment #387523 - Flags: review?(nelson)
Comment on attachment 387523 [details] [diff] [review]
updated patch

r=nelson
Attachment #387523 - Flags: review?(nelson) → review+
Checking in pk11mode.c;
/cvsroot/mozilla/security/nss/cmd/pk11mode/pk11mode.c,v  <--  pk11mode.c
new revision: 1.26; previous revision: 1.25
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: 3.12.5 → 3.12.4
You need to log in before you can comment on or make changes to this bug.