Closed
Bug 59855
Opened 25 years ago
Closed 24 years ago
OS/2 - Random Javascript code doesn't work.
Categories
(SeaMonkey :: General, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: sehh, Assigned: mkaply)
References
()
Details
(Keywords: js1.5, Whiteboard: CMVC32948)
Attachments
(17 files)
476 bytes,
patch
|
Details | Diff | Splinter Review | |
579 bytes,
patch
|
Details | Diff | Splinter Review | |
646 bytes,
patch
|
Details | Diff | Splinter Review | |
848 bytes,
patch
|
Details | Diff | Splinter Review | |
1.30 KB,
patch
|
Details | Diff | Splinter Review | |
698 bytes,
patch
|
Details | Diff | Splinter Review | |
449 bytes,
patch
|
Details | Diff | Splinter Review | |
970 bytes,
patch
|
Details | Diff | Splinter Review | |
993 bytes,
patch
|
Details | Diff | Splinter Review | |
989 bytes,
patch
|
Details | Diff | Splinter Review | |
741 bytes,
patch
|
Details | Diff | Splinter Review | |
5.51 KB,
patch
|
Details | Diff | Splinter Review | |
6.12 KB,
patch
|
Details | Diff | Splinter Review | |
6.69 KB,
patch
|
Details | Diff | Splinter Review | |
2.09 KB,
patch
|
Details | Diff | Splinter Review | |
1.15 KB,
patch
|
Details | Diff | Splinter Review | |
3.25 KB,
patch
|
Details | Diff | Splinter Review |
The page: http://www.modenos.com has some javascript
code to display random images.
It was working with M16, but now it doesn't work
with the latest M18 nightly build.
Comment 1•25 years ago
|
||
Browser, not engine --> Browser-General.
sehh@altered.com, could you be more specific about where the random
images are supposed to be? I'm not sure I see any bug (on WinNT, anyway).
Do they appear on the very first page you see at http://www.modenos.com,
or do you have to click on the "Enter" text to go to the next page?
Please give the exact steps to reproduce the bug - thanks.
Assignee: mkaply → asa
Component: Javascript Engine → Browser-General
QA Contact: pschwartau → doronr
Reporter | ||
Comment 2•25 years ago
|
||
Sorry, i'll try to be more specific.
On this page: http://www.modenos.com/index.html
(which is the first one.) you'll see three images,
the top one (www.modenos.com), the middle one
(a page, but it actually changes randomly and it
could be any of TWO faces) and the bottom one
(Enter).
On my Mozilla the middle image is replaced with
a text string "undefined".
I've put up a captured image here:
http://www.michelinakis.gr/Dimitris/images/mozilla.png
(~23kb)
Comment 3•25 years ago
|
||
adding mkaply for OS/2 help (please).
Assignee | ||
Comment 4•25 years ago
|
||
SCREENED. VERIFIED AS VALID.
Assignee: asa → mkaply
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: CMVC32948
Comment 6•25 years ago
|
||
I think best would be to make os/2 use the software-implemented copysign from
js/src/fdlibm. I'm loath to make the copysign call a no-op as it's been there
for eons. Using fd_copysign from fdlibm is safer.
Attachment to follow; Michael, what do you think?
Cleanest for the future would be to give os2/vacpp get its own section as with
the other OSes, but maybe on another round.
Comment 7•25 years ago
|
||
Assignee | ||
Comment 8•25 years ago
|
||
Is that code platform independent?
It seems to assume the location of the sign.
Can you be sure of the length of a double?
Comment 9•25 years ago
|
||
I believe it is xp; bit operations are parameterized with __HI or __LO to get
the appropriate part of the word/dword. Best of course would be to try it out.
Assignee | ||
Comment 10•25 years ago
|
||
Assignee | ||
Comment 11•25 years ago
|
||
Comment 12•25 years ago
|
||
r=cls on attach 19190
Comment 13•25 years ago
|
||
Oops, I see what was wrong with my extern statement. I copied the pattern from
the other OS sections, but the XP_OS2_VACPP code isn't with the other OS
sections, and precedes the __P define.
r=mccabe on your revised patch (it does the trick) but if you want to run with
it, I'll attach a patch that gives OS2 a proper fdlibm conditional linking
section. It needs a better #if defined() test against os2. If you're
concerned about standards conformance, it might be worthwhile to run some of the
javascript testsuite to see if fdlibm could help with any of the other math
functions. The testsuite uncovers problems with the math libraries of most
OSes, mostly for corner cases such as +- 0, NaN, infinity. The behavior of
these functions is defined in the ECMA-262 spec., after IEEE.
Comment 14•25 years ago
|
||
Assignee | ||
Comment 15•25 years ago
|
||
Comment 16•25 years ago
|
||
Not sure if I understand the $(FDLIBM_LIBRARY) rule changes. I believe they
should be more like the ones in config/rules.mk in LOOP_OVER_DIRS. There's no
reason to have a CONTINUE_ON_ERROR.
All platforms should probably have FDLIBM_LIBRARY set in SHARED_LIBRARY_LIBS but
I have a feeling that this may break the standalone JS build. Brendan, any
thoughts?
Assignee | ||
Comment 17•25 years ago
|
||
The change to the rules is because OS/2 doesn't handle the semicolon as a
separator for commands. same as the REGCHROME problem.
Assignee | ||
Comment 18•25 years ago
|
||
Mike mccabe:
Looks like fd_copysign is failing in some cases for us. It's copying extra stuff
besides the sign.
I'm looking.
Assignee | ||
Comment 19•25 years ago
|
||
Looks like LITTLE_ENDIAN wasn't defined for OS/2.
Attaching another diff.
Assignee | ||
Comment 20•25 years ago
|
||
Comment 21•25 years ago
|
||
mkaply: w/o looking at that file itself, your patch would indicate we're using
really crummy logic for the #if/#ifdefs to #define __LITTLE_ENDIAN
Shouldn't we have:
#ifdef __i386__
#define __LITTLE_ENDIAN
#endif
? and maybe others.
Assignee | ||
Comment 22•25 years ago
|
||
mccabe:
everything works for me, so I guess I r= your changes to jslibmath.h.
Do you think we should fix the LITTLE_ENDIAN stuff in fdlibm.h?
I'd really like to get these changes in.
Thanks
Comment 23•25 years ago
|
||
timeless makes a good point. mccabe, can you unify #defines?
Setting js1.5 and mozilla0.9 milestone keywords.
/be
Keywords: js1.5,
mozilla0.8
Assignee | ||
Comment 24•25 years ago
|
||
I'd really like these changes to go in.
What can I do to help speed this along?
Thanks
Assignee | ||
Comment 25•25 years ago
|
||
OK, fdlibm.h shouldn't have its own check for endianness - NSPR and JS already
define IS_LITTLE_ENDIAN if necessary.
I'm attaching a diff that cleans up fdlibm.h.
Assignee | ||
Comment 26•25 years ago
|
||
Comment 27•25 years ago
|
||
IS_LITTLE_ENDIAN, if defined rather than IS_BIG_ENDIAN, comes from jscpucfg.h,
which is included by jstypes.h (which a lot of files include -- it's akin to
prtypes.h). How does fdlibm.h include or otherwise acquire jscpucfg.h's
definition of IS_LITTLE_ENDIAN?
/be
Status: NEW → ASSIGNED
Assignee | ||
Comment 28•25 years ago
|
||
A very good point :)
I'm looking at the best way to include a header that defines IS_LITTLE_ENDIAN.
I'll get this if it kills me.
Assignee | ||
Comment 29•25 years ago
|
||
Comment 30•25 years ago
|
||
Looks good to me, daring sr=brendan@mozilla.org before any r=, cc'ing mang, who
helped integrate fdlibm.
/be
Comment 31•25 years ago
|
||
So what's the state of things? Does the last patch (using jstypes.h
IS_LITTLE_ENDIAN) fix the whole suite of problems? Or do we still need an added
OS/2 twiddle section in jslibmath.h? I'm looking to r=, but I'm confused :)
BTW, mac-savvy heads assure me that using <> for non-system header files will
bust on the mac, so we probably want "".
Assignee | ||
Comment 32•25 years ago
|
||
We definitely need the OS/2 stuff in jslibmath.h.
Once I made those changes, though, it still wasn't working correctly and I
discovered that fdlibm.h did only defined LITTLE_ENDIAN for Windows.
So, I thought the best course of action was to include jstypes.h which already
defined LITTLE_ENDIAN properly, rather than having another #define in in fdlibm.
So, I need r= on fdlibm.h which brendan already sr=, and then I'll check the
whole bunch in based on the previous r= on the changes to jslibmath.h and the
Makefile
Comment 33•25 years ago
|
||
Yeah, we need the Makefile.in patch to build fdlibm, jslibmath.h patch so OS/2
uses fdlibm, and the IS_LITTLE_ENDIAN patch against fdlibm.h to fix fdlibm.
However, the fdlibm.h patch currently breaks fdlibm/Makefile.ref since the
include paths in the makefile need to be changed. I'll have a look at this and
submit a patch.
r=mang on jslibmath.h (19212)
r=mang on Makefile.in (19190)
I'd like to hold off on 20342 until I have a corresponding patch to
fdlibm/Makefile.ref. Also note mccabe's comment about using <>. Someone should
also check if the Windows standalone makefile (js.mak) and Mac project (js.mdp)
still work with the patched fdlibm.h. fdlibm currently has no external
dependencies at all, but adding a dependency on jstypes.h seems worthwhile
instead of duplicating the endianness logic.
(Aside: I had to munge the end of line sequences to get mkaply's patches to
apply.)
Comment 34•25 years ago
|
||
Since jstypes.h depends on a generated header (jsautocfg.h) the problem for the
makefile is to build that header before descending into the fdlibm directory.
This is only slightly ugly on Unix, but those makefiles are plenty ugly
already. Doing a similar trick on Windows and Mac will probably be more
difficult.
At this point I'm tempted to say "worse is better" and that we should keep
fdlibm a standalone library without dependencies. So I propose we add a define
for OS2 to fdlibm.h instead of including jstypes.h.
Comment 35•25 years ago
|
||
Actually, it's not that bad, since Mac and Windows use a static header, not the
generated one. So the makefile/project for each platform only needs to add the
relevant dirs to the include path.
Comment 36•25 years ago
|
||
Comment 37•25 years ago
|
||
Comment 38•25 years ago
|
||
The two patches I just attached make it possible to build JSRef on Unix with the
right set of the other patches. The standalone build files for Windows and Mac
will have to be updated by someone with access to those machines. (Apparently
camelot, the old web-accessible Mac project file editor, is off-line.)
Comment 39•25 years ago
|
||
Neat! fdlibm is a real dependency instead of a PREDIR. I wonder if the same
thing would work with editline...
I think you're OK with the windows standalone build, as it's done with
Makefile.ref (and gnu tools). Brendan, is this true? Is js.mak being used?
I'm attaching a combined diff; this piecemeal stuff is confusing! It includes
attachments 20661, 20342, 20310, 19212, 20662... I wasn't quite sure which
change was appropriate for js/src/Makefile.in. Changed <> to "". I think
exports to dist/include mean that we're ok for fdlibm/Makefile.in; I'm not sure
if this applies for fdlibm/makefile.win or the mac build.
Comment 40•25 years ago
|
||
Comment 41•25 years ago
|
||
mccabe: Windoze standalone still uses js.mak -- we need to test that out with
this patch. My Win98 machine is monitor-less right now, who can help?
/be
Assignee | ||
Comment 42•25 years ago
|
||
Assignee | ||
Comment 43•25 years ago
|
||
OK, I built this standalone on Windows (js.mak) and it builds OK.
I had to update the Makefile a little to get it building right on OS/2 (I
actually removed some stuff)
I think this is good to go.
Assignee | ||
Comment 44•25 years ago
|
||
Comment 45•25 years ago
|
||
One thing, maybe my confusion: why do you need this ifdef? The Makefile.ref
does not have it around its FDLIBM rule.
+ifeq ($(OS_ARCH),OS2)
$(FDLIBM_LIBRARY):
+
$(MAKE) -C $(@D) $(@F)
+else
+$(FDLIBM_LIBRARY):
@$(CONTINUE_ON_ERROR) \
$(MAKE) -C $(@D) $(@F); \
$(EXIT_ON_ERROR)
+endif
/be
Assignee | ||
Comment 46•25 years ago
|
||
The way those lines were written is totally for a unix shell.
But, I just talked to Chris Seawood, and he indicated that the two *_ON_ERROR
lines should probably just be removed, then we wouldn't have to have a special
OS/2 path. Essentially, errors building fdlibm are being ignored.
This file is one of the older makefiles that needs to be cleaned up at some
point.
Comment 47•25 years ago
|
||
Can you remove the CONTINUE_ON_ERROR jazz from Makefile.ref, too -- or doesn't
OS2 use that makefile for standalone JS?
sr=brendan@mozilla.org with the CONTINUE_ON_ERROR junk nuked.
/be
Assignee | ||
Comment 48•25 years ago
|
||
Finally checked in.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 49•25 years ago
|
||
Reopening bug - on WinNT, I can no longer build the standalone JS shell
from scratch via:
make -f Makefile.ref
"From scratch" means: make a NEW root directory, pull mozilla/js/src
into this brand-new directory, and try to build.
Reason: Makefile.ref no longer builds js/src/fdlibm/(OBJ_DIR)/fdlibm.lib
So the build comes to a halt at a line where this is needed.
You don't encounter this problem in an EXISTING js/src directory,
because js/src/fdlibm/(OBJ_DIR)/fdlibm.lib was built there sometime
in the past, and does not get deleted by:
make -f Makefile.ref clean
Therefore you don't run into the error when you re-build...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 50•25 years ago
|
||
If I pull just mozilla/js/src, then go back to 3.21 of Makefile.ref, I get an
error in config.mk in js/src when running
nmake -f Makefile.ref
Is it supposed to be gmake?
Comment 51•25 years ago
|
||
That's right. On WinNT, I am also not able to use nmake; I have to use GNU make.
[/mozilla/js/src] gmake --version
GNU Make version 3.74, by Richard Stallman and Roland McGrath.
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95 Free Software Foundation,Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This version was ported to Win32 by Netscape Communications Corp.
Default shell: shmsdos. Build number: 19980324.
[/mozilla/js/src] make --version
GNU Make version 3.75, by Richard Stallman and Roland McGrath.
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Report bugs to <bug-gnu-utils@prep.ai.mit.edu>.
Assignee | ||
Comment 52•25 years ago
|
||
Comment 53•24 years ago
|
||
and this last change builds with nmake?
Assignee | ||
Comment 54•24 years ago
|
||
Updated•24 years ago
|
Keywords: mozilla0.8.1
Updated•24 years ago
|
Keywords: mozilla0.8
Assignee | ||
Comment 55•24 years ago
|
||
Comment 56•24 years ago
|
||
Mike has sent me a zip file of the affected files:
js/src/Makefile.ref
js/src/js.mak
js/src/makefile.win
js/src/fdlibm/fdlibm.h
By using these, I was able to successfully build the debug and
optimized JS shells on WinNT.
Assignee | ||
Comment 57•24 years ago
|
||
OK, I'M GIVING UP.
I don't think you can ever include jstypes.h in fdlibm.h There are too many
build dependencies between things.
All I was trying to do was not have a second ENDIAN check in fdlibm.h, but it is
simply not worth the effort.
The current build changes should/could go in - they make things a little
cleaner, but the fdlibm.h include should not.
I want to add:
#ifdef XP_OS2
#define _LITTLE_ENDIAN
#endif
to fdlibm.h and then this stupid bug will finally be gone.
Comment 58•24 years ago
|
||
Mike's latest idea works like a charm on both WinNT and Linux.
That is, we retain the changes indicated in attachment 26834 [details] [diff] [review] for:
js/src/Makefile.ref
js/src/js.mak
js/src/makefile.win
We do NOT use the changes in attachment 26834 [details] [diff] [review] for:
js/src/fdlibm/fdlibm.h
Instead, this file will have only the change Mike indicated in his last comment:
#ifdef XP_OS2
#define _LITTLE_ENDIAN
#endif
With this setup, I am able to successfully build the debug and optimized
JS shells on BOTH WinNT and Linux...
Assignee | ||
Comment 59•24 years ago
|
||
Brendan sent me a note with the sr, pschwartau was the r
All fixes checked in except the actual include of jstypes.h in fdlibm.h because
that doesn't work with Linux Makefile.ref.
I'm marking this bug fixed.
At some point, we should probably cleanup the fdlibm/js relationship, but for
now I just want this one gone.
Status: REOPENED → RESOLVED
Closed: 25 years ago → 24 years ago
Resolution: --- → FIXED
Comment 60•24 years ago
|
||
sehh@altered.com, or anyone with OS/2:
Can you verify that this bug is fixed? If so, please mark the bug
"Verified", otherwise, please reopen it - thanks.
Assignee | ||
Comment 61•24 years ago
|
||
sehh's email is no longer valid
I'm going to mark this one verified - we have tested his testcase.
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 62•24 years ago
|
||
My email is fine, i just couldn't reply because
i was in Sweden for some time.
Latest nightly build is still broken with this, but
i'm not sure if Mike has fixed it in an unpublished
nightly build.
Updated•21 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•