Closed Bug 145029 Opened 22 years ago Closed 22 years ago

Occurences of uninitialized variables being used before being set (in security/nss/lib)

Categories

(NSS :: Libraries, defect, P2)

x86
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mozilla-bugs, Assigned: wtc)

References

Details

Attachments

(2 files, 1 obsolete file)

This bug is just for the "xxx might be used uninitialized" warnings in various source files in security/nss/lib directory. Currently (http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1021514880.29242.gz&fulltext=1 - Wed, 15 May 2002 22:08 -0400) brad TBox shows the following warnings (although for some reason TBox only shows the file names, but not the directories): security/nss/lib/dev/devtoken.c:279 `status' might be used uninitialized in this function security/nss/lib/dev/devtoken.c:487 `objclass' might be used uninitialized in this function security/nss/lib/dev/devtoken.c:1085 `t' might be used uninitialized in this function security/nss/lib/dev/devutil.c:1059 `oi' might be used uninitialized in this function security/nss/lib/dev/devutil.c:1061 `match' might be used uninitialized in this function P.S. A similar bug for a previous version of NSS is bug 119376.
Bug 59652 is the meta-bug tracking the fight against these (potentially very nasty) warnings.
Blocks: 59652
Current list of warnings is: security/nss/lib/pk11wrap/pk11cert.c:2259 `cert' might be used uninitialized in this function security/nss/lib/smime/smimeutil.c:241 `c' might be used uninitialized in this function security/nss/lib/softoken/dbmshim.c:353 `len' might be used uninitialized in this function
Summary: Occurances of uninitialized variables being used before being set (in security/nss/lib) → Occurences of uninitialized variables being used before being set (in security/nss/lib)
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → 3.7
Attached patch Proposed patch (obsolete) (deleted) — Splinter Review
I reviewed all the uninitialized variable warnings generated by gcc on Linux in the nss/lib directory and the subdirectories under nss/cmd: certutil, modutil, signtool, cmsutil, selfserv, strsclnt, and tstclnt. (Note: you must build with BUILD_OPT=1 for gcc to generate the 'xxx might be used uninitialized' warnings. I don't know why.) None of them are bugs. So it is not required to check in this patch before 3.7 RTM.
> Note: you must build with BUILD_OPT=1 > for gcc to generate the 'xxx might be used uninitialized' > warnings. I don't know why. gcc only builds a data flow graph during the optimization stage. When buildig a graph, it can notice "bad" paths in it and report those as warnings. No optimization -> no data flow graph -> no warnings...
Target Milestone: 3.7 → 3.7.1
When reviewing this patch, please do the following. 1. Verify that none of these "might be used uninitialized" warnings are real bugs. 2. Verify that my fixes are correct. In some places I get rid of the warnings by ways other than initializing the variables.
Attachment #109704 - Attachment is obsolete: true
Attachment #109806 - Attachment description: Proposed patch v2 → Proposed patch v2 for the NSS_3_7_BRANCH
The patch for the tip of NSS has been checked in.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Target Milestone: 3.7.1 → 3.8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: