Closed Bug 47626 Opened 24 years ago Closed 23 years ago

Purify on Solaris reports UMR and UMC in nsLocalFileUnix

Categories

(Core :: XPCOM, defect, P3)

Sun
Solaris
defect

Tracking

()

RESOLVED FIXED
mozilla1.0

People

(Reporter: madams, Assigned: kandrot)

Details

Purify reports that the resolved_path local var in Normalize()
[nsLocalFileUnix.cpp 482] results in a UMR when realpath() is called. In
addition, a whole host of UMR/UMC's are returned from line 489. The following
patch fixes this.

I think that this is just a case of Purify being over-cautious; however, this
fix will at least clear out the noise.

------------------------------------------------------------------------
Index: nsLocalFileUnix.cpp
===================================================================
RCS file: /cvsroot/mozilla/xpcom/io/nsLocalFileUnix.cpp,v
retrieving revision 1.34
diff -u -r1.34 nsLocalFileUnix.cpp
--- nsLocalFileUnix.cpp 2000/08/03 22:17:43     1.34
+++ nsLocalFileUnix.cpp 2000/08/04 18:36:38
@@ -468,7 +468,7 @@
 NS_IMETHODIMP
 nsLocalFile::Normalize()
 {
-    char  resolved_path[PATH_MAX];
+    char  resolved_path[PATH_MAX] = "";
     char *resolved_path_ptr = NULL;
     CHECK_mPath();
 #ifdef XP_BEOS
Confirming for consideration.

Gerv
Status: UNCONFIRMED → NEW
Ever confirmed: true
I will worry about this after beta3.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Updating QA Contact
QA Contact: leger → hong
Hi Ray:

I am in the process of learning how the checkin process works.  Would you
mind if I take this one from you since this seems to be simple enough
to test out.  Would like to get your approval to checkin later on.

Thanks, Margaret
Edward: Welcome to xpcom!
Status: ASSIGNED → NEW
QA Contact: hong → rayw
Target Milestone: Future → mozilla1.0
Once again... attempting to reassign from Ray to Edward.
Assignee: rayw → kandrot
I see this with sun's workshop too. There isn't real bug, memory access check
just misses that realpath() somehow, maybe it does some woodoo magic in memory.

Mark's patch works ok and workshop stop whining. 
I do not have a way to verify this patch.  Anyone who can take this?  Thanks.
I'll give this an r=kandrot, since it appears to be a simple change (though I
can not verify that it fixes the intial problem).  scc, can I get an sr=?  Thanks.
Status: NEW → ASSIGNED
QA Contact: rayw → scc
sr=scc
Checked in.  Marking Fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.