[elinks-users] elinks-current + spidermonkey -> bus error MacOS

Kalle Olavi Niemitalo kon at iki.fi
Mon Sep 3 21:55:50 PDT 2007


Breen Mullins <breen.mullins at gmail.com> writes:

> #0  AES_ctr128_inc () at window.c:142
> 142                     struct document_view *doc_view = vs->doc_view;

This is apparently not AES_ctr128_inc() but rather
window_get_property() in src/ecmascript/spidermonkey/window.c.
The vs pointer has been read with JS_GetPrivate from window_obj.

> #1  0x0104dffc in ?? ()
> #2  0x0104dffc in ?? ()
> #3  0x0100e090 in ?? ()
> #4  0x01088f38 in ?? ()
> #5  0x01089120 in ?? ()
> #6  0x0108c47c in ?? ()
> #7  0x0108c600 in ?? ()
> #8  0x0108d414 in ?? ()
> #9  0x0100b314 in ?? ()

Some SpiderMonkey functions, I suppose.

> #10 0x00046f80 in aep_ctrl () at spidermonkey.c:184

This would be spidermonkey_get_interpreter() in
src/ecmascript/spidermonkey.c.  I have the following code here
(in ELinks 0.13.GIT commit 1fd2a77416 from 2007-08-12):

179	window_obj = JS_NewObject(ctx, (JSClass *) &window_class, NULL, NULL);
180	if (!window_obj) {
181		spidermonkey_put_interpreter(interpreter);
182		return NULL;
183	}
184	JS_InitStandardClasses(ctx, window_obj);
185	JS_DefineProperties(ctx, window_obj, (JSPropertySpec *) window_props);
186	JS_DefineFunctions(ctx, window_obj, (JSFunctionSpec *) window_funcs);
187	JS_SetPrivate(ctx, window_obj, interpreter->vs); /* to @window_class */

If JS_InitStandardClasses is somehow causing SpiderMonkey to call
window_set_property, then the private pointer has not yet been
set, and vs becomes NULL and causes a bus error.  Please try
moving the JS_SetPrivate call above the JS_InitStandardClasses
call and see if it helps.

It would also be interesting to know the names and line numbers
of the SpiderMonkey functions in the backtrace if you can get
debug symbols for those.  We could then check those functions in
the SpiderMonkey source, find the version of SpiderMonkey where
this first started occurring, and log that in elinks/NEWS.



More information about the elinks-users mailing list