If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Purify on Solaris reports UMR and UMC in nsLocalFileUnix

RESOLVED FIXED in mozilla1.0

Status

()

Core
XPCOM
P3
normal
RESOLVED FIXED
17 years ago
16 years ago

People

(Reporter: Mark G. Adams, Assigned: Edward Kandrot)

Tracking

Trunk
mozilla1.0
Sun
Solaris
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

17 years ago
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

Comment 2

17 years ago
I will worry about this after beta3.
Status: NEW → ASSIGNED
Target Milestone: --- → Future

Comment 3

17 years ago
Updating QA Contact
QA Contact: leger → hong

Comment 4

17 years ago
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

Comment 5

17 years ago
Edward: Welcome to xpcom!
Status: ASSIGNED → NEW
QA Contact: hong → rayw
Target Milestone: Future → mozilla1.0

Comment 6

17 years ago
Once again... attempting to reassign from Ray to Edward.
Assignee: rayw → kandrot

Comment 7

17 years ago
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. 
(Assignee)

Comment 8

17 years ago
I do not have a way to verify this patch.  Anyone who can take this?  Thanks.
(Assignee)

Comment 9

16 years ago
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

Comment 10

16 years ago
sr=scc
(Assignee)

Comment 11

16 years ago
Checked in.  Marking Fixed.
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.