Closed
Bug 55268
Opened 24 years ago
Closed 24 years ago
Crash "segment violation" when using PR_FormatTime
Categories
(NSPR :: NSPR, defect, P2)
Tracking
(Not tracked)
VERIFIED
FIXED
4.0.2
People
(Reporter: ykoehler, Assigned: larryh)
Details
Attachments
(1 file)
466 bytes,
patch
|
Details | Diff | Splinter Review |
Included is a fix for this crash. The BeOS crash because the tm_zone and the tm_gmtoff member exist under BeOS but weren't initialized properly.
Reporter | ||
Comment 1•24 years ago
|
||
Can't upload with Net+... so here's the patch Index: prtime.c =================================================================== RCS file: /cvsroot/mozilla/nsprpub/pr/src/misc/prtime.c,v retrieving revision 3.9 diff -u -r3.9 prtime.c --- prtime.c 1999/04/21 21:39:44 3.9 +++ prtime.c 2000/10/05 02:52:29 @@ -1655,6 +1655,13 @@ return 0; } #endif +#ifdef XP_BEOS + if(mktime(&a) == -1) + { + a.tm_zone = 0; + a.tm_gmtoff = NULL; + } +#endif return strftime(buf, buflen, fmt, &a); }
Reporter | ||
Comment 2•24 years ago
|
||
This make mozilla crash as soon as you browse therefore I've raised the priority
Severity: normal → critical
Priority: P3 → P2
Comment 3•24 years ago
|
||
Does this patch work? Index: mozilla/nsprpub/pr/src/misc/prtime.c =================================================================== RCS file: /cvsroot/mozilla/nsprpub/pr/src/misc/prtime.c,v retrieving revision 3.9 diff -u -r3.9 prtime.c --- prtime.c 1999/04/21 21:39:44 3.9 +++ prtime.c 2000/10/05 03:17:49 @@ -1649,7 +1649,7 @@ * values for these two fields. */ -#if defined(SUNOS4) || (__GLIBC__ >= 2) +#if defined(SUNOS4) || (__GLIBC__ >= 2) || defined(XP_BEOS) if (mktime(&a) == -1) { PR_snprintf(buf, buflen, "can't get timezone"); return 0;
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 4•24 years ago
|
||
Assigned the bug to larryh.
Assignee: wtc → larryh
Target Milestone: --- → 4.0.2
Reporter | ||
Comment 5•24 years ago
|
||
Reporter | ||
Comment 6•24 years ago
|
||
Ok tried the propose solution to simply add || defined(XP_BEOS) and it works also!
Comment 7•24 years ago
|
||
Do you want this fix in NSPRPUB_CLIENT_BRANCH? Any other branches?
Reporter | ||
Comment 8•24 years ago
|
||
tip + the client branch. Btw, when is the client.mk will start using the tip?
Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 9•24 years ago
|
||
Checking in Wan-Teh's version of patch to the tip of tree. /cvsroot/mozilla/nsprpub/pr/src/misc/prtime.c,v <-- prtime.c new revision: 3.12; previous revision: 3.11
Updated•24 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 10•24 years ago
|
||
I checked in the patch on the NSPRPUB_CLIENT_BRANCH and the NSPRPUB_RELEASE_4_0_BRANCH.
You need to log in
before you can comment on or make changes to this bug.
Description
•