[Vm-dev] Android VM

Santiago Bragagnolo santiagobragagnolo at gmail.com
Wed Oct 5 15:29:58 UTC 2016


Hi All!
I'm working on the Android VM. (https://github.com/sbragagnolo/pharo-vm)
 So far I made my way on my own(I have a working compilation of the stack
vm for android functional, but without uffi and quite slow ). But now i
have a problem that I don't understand at all, i would like if someone can
point me a clue :).

Im working on the VM+Jit for android. The device i'am using to test is a
wiko pulp 4g[1], processor Quad-core 1.2 GHz Cortex-A53 with support for
32bits/64bits instructions [2]

I am compiling the VM with the following maker options:

*maker options: #(*
* ObjectMemory Spur32BitCoMemoryManager*
* FailImbalancedPrimitives false*
* CogCompilerClass CogOutOfLineLiteralsARMCompiler*
* ISA ARMv5).*

After some manual post processing (related to an other question that i will
do in other thread), I arrive to compile and deploy the application in to
my device.

But when I open the application I am having the following assertion failure
( defined in sqCogStackAlignment.h ),

  *assert((getfp() & STACK_ALIGN_MASK) == STACK_FP_ALIGNMENT);*

 and failing in the second call for the assertion, on the generated
function *generateStackPointerCapture* on the generated file *cogitARMv5.c*,
based on the method *Cogit>>#generateStackPointerCapture, *and not
finishing the process, but just failing many other times in the same
assertion (not sure if on the same function)


*=====================*
static void generateStackPointerCapture(void) {
    sqInt oldMethodZoneBase;
    sqInt oldTrampolineTableIndex;

/* For the benefit of the following assert, assume the minimum at first. */
        cFramePointerInUse = 0;
assertCStackWellAligned();
oldMethodZoneBase = methodZoneBase;
oldTrampolineTableIndex = trampolineTableIndex;
generateCaptureCStackPointers(1);
ceCaptureCStackPointers();
if (!((cFramePointerInUse = isCFramePointerInUse()))) {
methodZoneBase = oldMethodZoneBase;
trampolineTableIndex = oldTrampolineTableIndex;
generateCaptureCStackPointers(0);
}
assertCStackWellAligned();   *// it fails Here*
}
*======================*

Here I'm lacking understanding, and even when after some painful time I
arrived to be able to debug on my device when I leave the debugger just to
run and randomly interrupt the process to know where is failing constantly
(i'm almost sure that is an infinite loop, because of the standard output)
It just die, or it stops without showing code, since is the code stored on
the assembly files.

I have two obvious questions:

  1) does the prepareVmMaker method that I defined makes sense?
  2) any body can give me a hint about how to debug better this problem?

And finally, does any body have a hint in general about what can it be?

[1] http://www.gsmarena.com/wiko_pulp_4g-7811.php
[2] http://www.arm.com/products/processors/cortex-a/cortex-a53-processor.php
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20161005/4b5bd620/attachment.htm


More information about the Vm-dev mailing list