Closed
Bug 199901
Opened 22 years ago
Closed 22 years ago
OS/2 - Cookies don't work (PR_snprintf problem)
Categories
(NSPR :: NSPR, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
4.4
People
(Reporter: mrmazda, Assigned: wtc)
Details
Attachments
(1 file, 1 obsolete file)
671 bytes,
patch
|
wtc
:
review+
asa
:
approval1.4a+
|
Details | Diff | Splinter Review |
OS/2 trunk builds. Works OK as of 2003031312. Broken in 2003033012 going back at
least 6 days.
%d is written in place of integer for expire time in cookies.txt, causing
corruption of file and loss of all cookies saved in prior sessions.
Comment 1•22 years ago
|
||
-> mkaply
confirmed - we spent a while debugging this one. os/2 only, works on other
platforms...
looks like the recent cookie rewrite has exposed a problem in PR_snprintf. we
have these two datapoints:
0312 build, the following line produces a correctly formatted integer:
PR_snprintf(dateString, sizeof(dateString), "%lu", some_unsigned_long);
0330 build, the following line produces "%d":
PR_snprintf(dateString, sizeof(dateString), "%lld", some_PRInt64);
so what we know for sure is that os/2 handling of "%lld"/PRInt64's is busted in
0330, but whether this was always the case or is due to some recent os/2
checkins i'm unsure. the symptom of this is that cookies don't persist across
sessions, since the cookie file is corrupted.
mkaply?
Assignee: darin → mkaply
Reporter | ||
Comment 2•22 years ago
|
||
Further testing results:
2003032209 is broken
2003032112 is OK
Comment 3•22 years ago
|
||
great! so this confirms it was most probably just the change to "%lld" from
"%lu" that broke things - so PR_snprintf has probably been broken on os/2 for
some time.
mkaply: should this be a blocker?
Comment 4•22 years ago
|
||
oh, one random note:
PR_sscanf works fine with %lld on the affected builds:
PRInt32 numInts = PR_sscanf(dateString, "%lld", &some_PRInt64);
Comment 5•22 years ago
|
||
Where are the PR_snprintfs in question?
On OS/2, we have a major issue where time_t is represented as a double and must
be case to a long for this stuff.
I'm wondering if this is the cause (or something related)
PR_snprintf is a totally NSPR call, so if %lld should be handled by NSPR.
Honestly, at this point it looks like the VACPP build is suddenly falling apart.
I can't even compile on my machine anymore (brings down the kernel)
Comment 6•22 years ago
|
||
mkaply: thanks for the quick response. to answer...
according to prprf.h, %lld should be supported. see
http://lxr.mozilla.org/seamonkey/source/nsprpub/pr/include/prprf.h#39
and the PR_snprintf in question is
http://lxr.mozilla.org/seamonkey/source/extensions/cookie/nsCookies.cpp#1799
this doesn't involve time_t, it's purely PRInt64 arithmetic, so i'm not quite
sure what you meant.
Comment 7•22 years ago
|
||
uhh, sorry... second link should be
http://lxr.mozilla.org/seamonkey/source/extensions/cookie/nsCookies.cpp#1979
and, best of luck with VACPP. ;)
Comment 8•22 years ago
|
||
Optmizer bug in NSPR.
I was able to fix it by unoptimizing prprf.c.
Dang.
Comment 9•22 years ago
|
||
Moving to NSPR
Assignee: mkaply → wtc
Component: Cookies → NSPR
Product: Browser → NSPR
QA Contact: tever → wtc
Version: Trunk → 4.2.1
Comment 10•22 years ago
|
||
I give up.
We're turning off optimization for VACPP for NSPR.
Updated•22 years ago
|
Severity: critical → blocker
Summary: OS/2 - PR_snprintf broken (cookies.txt corrupted) → OS/2 - Cookies don't work (PR_snprintf problem)
Comment 11•22 years ago
|
||
Comment on attachment 118965 [details] [diff] [review]
Turn off optimization for VACPP
OS/2 builds haven't had cookies working for a week now we discovered (since the
cookie landing)
Attachment #118965 -
Flags: approval1.4a?
Comment 12•22 years ago
|
||
Comment on attachment 118965 [details] [diff] [review]
Turn off optimization for VACPP
Turning optimizations off for the entire NSPR tree seems a bit exccessive but I
guess it's not going to be around that much longer anyway.
Attachment #118965 -
Flags: review+
Assignee | ||
Comment 13•22 years ago
|
||
Comment on attachment 118965 [details] [diff] [review]
Turn off optimization for VACPP
Ideally you should identify the files and only turn off
optimization on those files. Have you given up on that,
too?
Comment 14•22 years ago
|
||
There is no easy method to turn off optimization on individual files.
If you have a really good suggestion for that, that would be great.
I'm just getting tired of optimizer bugs.
Assignee | ||
Comment 15•22 years ago
|
||
mozilla/nsprpub/pr/src/misc/Makefile.in, rev. 1.15 has an
example of turning off optimization on a specific file.
# This suppresses optimization for this single compilation unit.
ifeq ($(OS_ARCH), AIX)
$(OBJDIR)/prdtoa.o: prdtoa.c
@$(MAKE_OBJDIR)
$(CC) -o $@ -c $(filter-out -O, $(CFLAGS)) $<
endif
In comment 8, you said you can fix it by unoptimizing prprf.c.
I suggest you apply a similar makefile patch to
mozilla/nsprpub/pr/src/io/Makefile.in.
Status: NEW → ASSIGNED
Comment 16•22 years ago
|
||
Attachment #118965 -
Attachment is obsolete: true
Assignee | ||
Comment 17•22 years ago
|
||
Comment on attachment 118993 [details] [diff] [review]
Just turn off opt for prprf.c
r=wtc.
Requesting mozilla 1.4a approval. This is an OS/2-only makefile change.
Attachment #118993 -
Flags: review+
Attachment #118993 -
Flags: approval1.4a?
Assignee | ||
Updated•22 years ago
|
Attachment #118965 -
Flags: approval1.4a?
Comment 18•22 years ago
|
||
Comment on attachment 118993 [details] [diff] [review]
Just turn off opt for prprf.c
a=asa (on behalf of drivers) for checkin to 1.4a. Time is short so this needs
to land quickly.
Attachment #118993 -
Flags: approval1.4a? → approval1.4a+
Comment 19•22 years ago
|
||
The patch has been checked in on the client branch & the NSPR trunk.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•22 years ago
|
Whiteboard: [4.3.1]
Assignee | ||
Updated•22 years ago
|
Whiteboard: [4.3.1]
Target Milestone: --- → 4.4
You need to log in
before you can comment on or make changes to this bug.
Description
•