Due to issues with my program I compiled with SAFE_HEAP=1. The single
message "Assertion failed: undefined" appears in the stdout box. Looking
at the stack trace in the console window I can see that it comes from
attempting to load an unaligned i32 value. The offending code is in
WinCreate in esUtil.c (which I borrowed from the tests directory). It is

static Display *x_display = NULL;
WinCreate(ESContext *esContext, const char* title)
{
    ...
    x_display = XOpenDisplay(NULL)
    if (x_display == NULL)
    {
        return EGL_FALSE;
    }
    root = DefaultRootWindow(x_display);  <=== this is the line where the 
assert happens

Is anyone aware of an issue with the X emulation? The corresponding JS
code is

var $9=SAFE_HEAP_LOAD(8, "%struct XDisplay*", 0, 0);
var $10=$9;
var $11=(($10+132)|0);
var $12=SAFE_HEAP_LOAD($11, "i32", 0, 0);  <=== this is the line where the 
assert happens.

132 (line 4) is a multiple of 4 so the only way $11 could not be a
multiple of 4 is if the struct XDisplay is not itself 4-byte aligned
which looks like a possible compiler bug.

------------------------------------------------------------------

Before I noticed that a stack trace was printed in the console, I set a
breakpoint in assert to  find out where the assertion was coming from
and reloaded the page. The breakpoint was hit several times in other
places and with other real messages before I got fed up, removed the
breakpoint and hit continue. That is when the above message finally
appeared. None of the other messages appeared in the console or stdout
box. The ones I observed and noted before I removed the breakpoint were

    "Cannot fallback to non-typed array case: Code is too specialized"
    "Typed arrays 2 must be run on a little-endian system"  // I *am*
    running on a little-endian system
    An assert in staticAlloc with a message: assert(!staticSealed)

What do these mean, why was nothing printed in the stdout box or console
and why did they not abort execution?

I am using Firefox 27.0.1

Regards

    -Mark

-- 
注意:この電子メールには、株式会社エイチアイの機密情報が含まれている場合
が有ります。正式なメール受信者では無い場合はメール複製、 再配信または情
報の使用を固く禁じております。エラー、手違いでこのメールを受け取られまし
たら削除を行い配信者にご連絡をお願いいたし ます.

NOTE: This electronic mail message may contain confidential and
privileged information from HI Corporation. If you are not the intended
recipient, any disclosure, photocopying, distribution or use of the
contents of the received information is prohibited. If you have received
this e-mail in error, please notify the sender immediately and
permanently delete this message and all related copies.

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to