Closed
Bug 421978
Opened 17 years ago
Closed 17 years ago
valgrind warnings loading https site due to bad #ifdef-ing (reading uninitialized memory)
Categories
(NSS :: Libraries, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
3.12
People
(Reporter: dbaron, Assigned: rrelyea)
References
Details
Attachments
(1 file)
(deleted),
patch
|
rrelyea
:
review+
|
Details | Diff | Splinter Review |
When I load https://bugzilla.mozilla.org/ in trunk Firefox, I see three valgrind warnings (two about conditional jump or move depending on an uninitialized value, and the third about use of an uninitialized value) at the following stack (relevant part included; the point is that uninitialized memory is being passed to printf):
...
==4461== by 0x6452743: PR_snprintf (prprf.c:1169)
==4461== by 0x5DCC441: nsString::AppendInt(int, int) (nsStringObsolete.cpp:1215)
==4461== by 0x15A1B37F: nsPK11Token::refreshTokenInfo() (nsPK11TokenDB.cpp:98)
==4461== by 0x15A1B8BA: nsPK11Token::nsPK11Token(PK11SlotInfoStr*) (nsPK11TokenDB.cpp:66)
==4461== by 0x15A1BBCD: nsPK11TokenDB::GetInternalKeyToken(nsIPK11Token**) (nsPK11TokenDB.cpp:481)
==4461== by 0x5DAD8EC: NS_InvokeByIndex_P (xptcinvoke_x86_64_linux.cpp:208)
...
These warnings are fixed by the attached patch. I'm quite surprised the code compiled without this patch; I think it's worth considering using stricter compilation options.
This is a regression from the changes in attachment 266692 [details] [diff] [review] on bug 217538.
Reporter | ||
Comment 1•17 years ago
|
||
(In reply to comment #0)
> I'm quite surprised the code
> compiled without this patch; I think it's worth considering using stricter
> compilation options.
Er, never mind that. Of course it compiled; it was all #ifdef-ed out.
Updated•17 years ago
|
Assignee: nobody → rrelyea
Assignee | ||
Comment 2•17 years ago
|
||
Comment on attachment 308504 [details] [diff] [review]
patch
r+ (or even killing the whole ifdef completely).
bob
Attachment #308504 -
Flags: review+
Assignee | ||
Comment 3•17 years ago
|
||
cvs commit pkcs11.c
Checking in pkcs11.c;
/cvsroot/mozilla/security/nss/lib/softoken/pkcs11.c,v <-- pkcs11.c
new revision: 1.149; previous revision: 1.148
done
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•17 years ago
|
Priority: -- → P3
Target Milestone: --- → 3.12
You need to log in
before you can comment on or make changes to this bug.
Description
•