Closed
Bug 44426
Opened 25 years ago
Closed 24 years ago
Mozilla segfaults in JS_NewStringCopyZ on startup on OpenBSD.
Categories
(Core :: JavaScript Engine, defect, P3)
Tracking
()
VERIFIED
FIXED
People
(Reporter: mozillaBugzilla, Assigned: shaver)
References
Details
(Keywords: verifyme)
Attachments
(1 file)
Mozilla segfaults in JS_NewStringCopyZ on startup on OpenBSD-curretn (post 2.7).
My .mozconfig
ac_add_options --disable-mailnews
ac_add_options --disable-tests
ac_add_options --enable-optimize
ac_add_options --disable-debug
bash-2.03$ ./mozilla
./run-mozilla.sh ./mozilla-bin
MOZILLA_FIVE_HOME=.
LD_LIBRARY_PATH=.
LIBRARY_PATH=.
SHLIB_PATH=.
LIBPATH=.
ADDON_PATH=.
MOZ_PROGRAM=./mozilla-bin
MOZ_TOOLKIT=
moz_debug=0
moz_debugger=
RegSelf Unicode to Big5 converter complete
RegSelf Unicode to x-x-big5 converter complete
RegSelf Big5 to Unicode converter complete
Memory fault (core dumped)
bash-2.03$ gdb mozilla-bin mozilla-bin.core
GNU gdb 4.16.1
Copyright 1996 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-unknown-openbsd2.7"...
Core was generated by `mozilla-bin'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/libexec/ld.so...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/./libraptorgfx.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/./libxpcom.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/./libmozjs.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/./libjsj.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/./libplds4.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/./libplc4.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/./libnspr4.so.1.0...done.
Reading symbols from /usr/local/lib/libgtk.so.1.2...done.
Reading symbols from /usr/local/lib/libgdk.so.1.2...done.
Reading symbols from /usr/local/lib/libgmodule.so.1.2...done.
Reading symbols from /usr/local/lib/libglib.so.1.2...done.
Reading symbols from /usr/local/lib/libintl.so.1.0...done.
Reading symbols from /usr/X11R6/lib/libXext.so.6.3...done.
Reading symbols from /usr/X11R6/lib/libX11.so.6.1...done.
Reading symbols from /usr/lib/libutil.so.4.5...done.
Reading symbols from /usr/lib/libm.so.0.1...done.
Reading symbols from /usr/lib/libstdc++.so.30.0...done.
Reading symbols from /usr/lib/libc_r.so.3.0...done.
Reading symbols from /usr/lib/libc.so.24.4...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libsample.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libxpconnect.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libjsloader.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libnecko_cache.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libnecko.so.1.0...done.
Reading symbols from /usr/lib/libz.so.1.3...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libnecko2.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/liburiloader.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libuconv.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libucvja.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libucvcn.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libucvlatin.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libucvtw.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libucvtw2.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libucvko.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libucvibm.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libunicharutil.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libnslocale.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libstrres.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/liblwbrk.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libchardet.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libpref.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libnsgif.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libnspng.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libnsjpg.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/./libjpeg.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/liboji.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libjar50.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libcaps.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libraptorhtmlpars.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libgfxps.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libgfx_gtk.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libjsurl.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libraptorview.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libwidget_gtk.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/./libgtksuperwin.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libraptorhtml.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/./libjsdom.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libmork.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libchrome.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/librdf.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libwebbrwsr.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libeditor.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libtxmgr.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libtxtsvc.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libprofile.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libnsprefm.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libnsappshell.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libmozbrwsr.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libbookmarks.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libdirectory.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libmozfind.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libhistory.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libsearch.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/librelated.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libregviewer.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libmozucth.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libmozxfer.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libshistory.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libtbmb.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libautocomplete.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/liburlbarhistory.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libxpinstall.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libcookie.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libwallet.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libwalletviewers.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/components/libpsmglue.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/./libcmt.so.1.0...done.
Reading symbols from
/.disk1/home/marcus/mozilla/dist/bin/./libprotocol.so.1.0...done.
#0 0x4017d0da in JS_NewStringCopyZ ()
(gdb) where
#0 0x4017d0da in JS_NewStringCopyZ ()
#1 0x4064789c in L2066 ()
#2 0x4067362c in nsXPCWrappedNativeClass::CallWrappedMethod ()
#3 0x40676102 in L1934 ()
#4 0x40676d6d in WrappedNative_DefaultValue ()
#5 0x401c6eaa in js_ValueToString ()
#6 0x40194fab in js_ReportUncaughtException ()
#7 0x4017cad9 in JS_ExecuteScript ()
#8 0x406a6939 in mozJSComponentLoader::GlobalForLocation ()
#9 0x406a6253 in mozJSComponentLoader::ModuleForLocation ()
#10 0x406a58b9 in mozJSComponentLoader::AttemptRegistration ()
#11 0x406a55f6 in mozJSComponentLoader::AutoRegisterComponent ()
#12 0x406a5075 in mozJSComponentLoader::RegisterComponentsInDir ()
#13 0x406a4f34 in mozJSComponentLoader::AutoRegisterComponents ()
#14 0x400e25f1 in AutoRegister_enumerate ()
#15 0x4007b709 in _hashEnumerate ()
#16 0x401f3bad in PL_HashTableEnumerateEntries ()
#17 0x4007bb33 in nsHashtable::Enumerate ()
#18 0x400e30c0 in nsComponentManagerImpl::AutoRegister ()
#19 0x400f7c6f in nsComponentManager::AutoRegister ()
#20 0x992f in NS_AutoregisterComponents ()
#21 0x9bf6 in NS_SetupRegistry_1 ()
#22 0x41e3 in main1 ()
#23 0x5419 in main ()
Comment 1•25 years ago
|
||
jband, mccabe and I thought the stack trace of this bug might be an XPConnect
or JS Engine issue and not browser. What do you think?
Reporter, what was the date of the build this crash occurred on? Is it still
occurring with the most recent build?
Note bug 44342 describes the same symptom on all platforms (builds hang on
startup), but the stack traces there seem very different (...?)
Assignee: rogerl → jband
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•25 years ago
|
||
Just wanted to note there have been other recent bugs that seem to happen
only on FreeBSD; see bug 43214, for example...
Reporter | ||
Comment 3•25 years ago
|
||
The build I tested was compiled from source, fetched on the date of the bug (10-
Jul-2000)
I updated the source and re-compiled several times over the next few days.
I can't tell you when this crash started happening, because unill recently,
Mozilla never got this far.
BTW, this is abug on openBSD, notFreeBSD :)
I'm not going to be able to compile Mozilla for about 2 weeks.
Comment 4•25 years ago
|
||
I have to suspect that args might be getting mangled in the call through
xptcall.
Maybe this is a dup of http://bugzilla.mozilla.org/show_bug.cgi?id=33739
Does the compiler version mentioned match up?
The #define change mentioned there would be in xptc_platforms_unixish_x86.h. You
might try the change and compiling everything to see what happens.
shaver, what do you think?
Assignee: jband → shaver
Reporter | ||
Comment 5•25 years ago
|
||
OpenBSD 2.7 ships with GCC 2.95.2, OpenBSD 2.6 ships with GCC 2.95.1
I don't currently have access to a PC With Openbsd on it to check things. It
will probably be about 3 weeks untill I can do more testing again.
Reporter | ||
Comment 6•25 years ago
|
||
In May 1999, OpenBSD changed to gcc 2.95.x from GCC 2.8.1. I changed the #define
for OpenBSD, and it gets past the point where it crashes.
I'll attach a patch early next week (One that can tell the difference between
versions).
Reporter | ||
Comment 7•25 years ago
|
||
Reporter | ||
Comment 8•25 years ago
|
||
The patch fixes this crash in OpenBSD. It uses THUNK_BASED_THIS_ADJSUT for
OpenBSD 2.5 and earlier and CFRONT_BASED_THIS_ADJUST for OpenBSD 2.6 and later,
which come with GCC 2.95.x.
Whiteboard: [PATCH]
Assignee | ||
Comment 9•25 years ago
|
||
So, this sort of patch, while superficially tempting, makes me really nervous.
If we put this in the tree, then people will have to build different binaries
for OpenBSD 2.5 and OpenBSD 2.6. Is the OpenBSD world OK with that additional
barrier-to-support? Maybe they're used to that -- I don't know how compatible
2.8.1 and 2.95.[12] are in other ways.
I don't of course, have any other real suggestions, but the Unix support matrix
is groaning under the weight of this sort of combinatorial explosion already --
and gcc3 will just make it worse. =(
Status: NEW → ASSIGNED
Reporter | ||
Comment 10•25 years ago
|
||
I aggree with your issues regarding this patch and the one from
http://bugzilla.mozilla.org/show_bug.cgi?id=33739
I believe that 33739 was kept open in the search of a better solution to this
problem, even though the patches from that bug appear to have been applied.
Although I can't speak for the OpenBSD community, I don't think OpenBSD has ever
had a native browser anyway. The only way to get Netscape running was to get the
BSDI version and run it in compatability mode.
My preference is to have a working browser. The idea of releasing 2 binaries,
one for OpenBSD <=2.5 and one for >2.5 seems more acceptable than having one
browser for <=2.5 and nothing for later releases (or vice versa).
I guess my prefference is to put the patch in, then resolve this bug as a dupe
of 33739, and when that bug is resolved, This patch can be removed/changed in
the same way as the FreeBSD one. (or have this bug depending on 33739)
Assignee | ||
Comment 11•25 years ago
|
||
Yeah, OK. I'll buy that. But when people come complaining that
real-whatever-plugin-openbsd.xpi doesn't work for them on <the other set>, I'm
sending them to you! =)
Comment 12•25 years ago
|
||
*** Bug 49036 has been marked as a duplicate of this bug. ***
Comment 14•24 years ago
|
||
*** Bug 49129 has been marked as a duplicate of this bug. ***
Comment 15•24 years ago
|
||
a=brendan@mozilla.org (use the patch keyword instead of [PATCH] next time, ok?)
/be
Assignee | ||
Comment 16•24 years ago
|
||
I'm going to close this bug, because I've checked in the attached patch.
I'm still interested in doing The Right(er) Thing, as Jonathan Lennox has so
helpfully researched and explained in 39268, but this seemed a safer interim
fix. When we get more FreeBSD version converage for Jonathan's patch, I'd
gladly slam that in, too.
Thanks for your help, everyone!
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 17•24 years ago
|
||
Could someone with OpenBSD verify this with the latest pull?
I don't have OpenBSD - thanks -
Reporter | ||
Comment 18•24 years ago
|
||
Verified fixed with a newly checked out version of the source. It gets past the
point where it used ot crash. Thank you all for your help. Mike, I'll keep an
eye out for a better way to do this for OpenBSD, If I find one, I'll create a
new bug...
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•