Hello,
Thank you for the parameter information, now I have more Information
about the failure, and I was able locate it but not to to fix the failure.
I've inserted some printf()-Funktions to see where the error occur.
The error appears after my last change but only in the following tests
of the JIT-Test: self-test/assertDeepEq.js.
// cross-compartment
var g1 = newGlobal(), g2 = newGlobal();
assertDeepEq(g1, g2);
assertDeepEq(g1, g2, {strictEquivalence: true});
Object.preventExtensions(g2.Math.abs); // make some miniscule change
assertNotDeepEq(g1, g2);
I've found, that there's a failure with memory access.
I've run each test alone to see it's output and it seems like all have
the same output.
Output:
----
CompareObject
getEqualityObj
isProxy
createHandleObj
isNotTransparent
getEqualityObj
isProxy
createHandleObj
isNotTransparent
CompareObject
getEqualityObj
isProxy
Speicherzugriffsfehler (Speicherabzug geschrieben)
The first comparism with StrictlyEqual (Interpreter.cpp) is ok ( see
"CompareObject" from Output), but then it executes a second and this
fails. But I don't know why and I also don't know why a second one is
called.
My Implementation is as follows:
inline JSObject *
GetEqualityObject(JSContext *cx, JSObject *obj)
{
printf("getEqualityObj\n");
JSObject *equalsObj = obj;
if(!IsProxy(equalsObj))
{
printf("isNotAProxy\n");
return equalsObj;
}
else
{
bool result = false;
printf("isProxy\n");
JS::RootedObject handleEqualsObj(cx,equalsObj);
if (!handleEqualsObj){
printf("handleIsNull\n");
return equalsObj;
}
printf("createHandleObj\n");
if(!Proxy::isTransparent(cx, handleEqualsObj, &result) || !result)
{
printf("isNotTransparent\n");
return equalsObj;
}
else
{
printf("isTransparent\n");
equalsObj = GetProxyTargetObject(equalsObj);
return GetEqualityObject(cx, equalsObj);
}
}
}
And I use the following implementation in the StrictlyEqual method of
the Interpreter.cpp to get the objects:
if (lval.isObject()) {
printf("CompareObject\n");
JSObject *l = GetEqualityObject(cx, &lval.toObject());
JSObject *r = GetEqualityObject(cx, &rval.toObject());
*equal = l == r;
return true;
}
Is it possible that the following command of my GetEqualityObject method
leads to the memory access fault?
JS::RootedObject handleEqualsObj(cx,equalsObj);
And if this is the fault, how can I fix it?
Can you explain me why more than one comparisms is called?
I see in the shell code there is a loop for all properties of the
objects which compares the names to !==. Is the second call the
"assertSameValue" function? And why does it fail?
Best Regards
Andreas
Am 14.12.2013 12:54, schrieb Till Schneidereit:
> On Sat, Dec 14, 2013 at 12:29 PM, Andreas Schlegel
> <[email protected] <mailto:[email protected]>> wrote:
>
> Hello,
>
> If I run the test with folowing command:
> ../jit-test/jit_test.py ./js self-test -o --write-failure-output
> --write-failures /home/fedora/workspace/mozilla/jit-tests
>
> I've only the following Error code in the log file:
> self-test/assertDeepEq.js
> Exit code: -11
>
> Where can I find the message for this code?
>
>
> You can run jit_test.py with the -s argument to see the shell command
> that is executed. You can then just run that command directly, and see
> the output. In this case, that probably won't be too informative, as
> it's a crash, but you can also run this under a debugger, of course.
>
_______________________________________________
dev-tech-js-engine-internals mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals