[squeak-dev] [Vm-dev] Reviving the Android VM
David T. Lewis
lewis at mail.msen.com
Sun Jun 18 16:40:59 UTC 2017
Hi Michael,
Nice to see you here :-)
I am CCing squeak-dev because there is likely to be interest there, and some
historical expertise also.
Yes, vm-dev is a good place for follow ups.
Dave
On Sat, Jun 17, 2017 at 07:48:31AM +1200, Michael Rueger wrote:
>
> Hi all,
>
> long time no see :-)
>
> Recently I spent a bit of time trying to piece together an Android VM using
> the up to date versions of AndroidStudio, SDK and NDK. Once things are
> building and running, I was planning to fold everything back into the
> proper build process.
>
> Current (somewhat messy) state of things here
> https://github.com/mrueger42/st-android
>
> It has been quite a long time since I looked at building VMs, so forgive me
> if I'm just being stupid here...
>
> I was able to get the original port from Andreas to build and run, but it
> is a very outdated version. Still nice to have it as a piece of history, I
> think (AndroidVM in the above repo).
>
> Some puzzle pieces later I have something running that is based on recent
> CogSpur opensmalltalk code and bits and pieces I found. Unfortunately
> CogSpur doesn't seem to play well with the setjmp/longjmp used in the code
> (CogDroid in the above repo).
>
> Plus, the VM is running on the UI thread, not something that is viewed well
> on mobile. Actually it makes Android just kill the app if you block the UI
> thread for too long.
>
> Trying to run the VM on a thread runs into a division by 0 exception (I
> think) and finds me way out of my league to track down why that would be.
> Crash below...
>
> I haven't really tried getting Dmitry's version to build/work in a current
> environment, partly because I'm not sure I'm looking at the most up to date
> version (see below).
>
> Any help, pointers, code snippets highly appreciated!
>
> Cheers
>
> Michael
>
> P.S. Sending this to vm-dev and pharo-dev, but should probably send any
> followup to vm-dev?
>
> --------
>
>
> list of sources I looked at:
>
> -opensmalltalk
> -pharo
>
> -original port by Andreas
> git at github.com:timfel/squeak-android-vm.git
>
> -stack
> https://github.com/sbragagnolo/pharo-vm/
>
> -dmitry
> gitorious is no longer, just an archival snapshot
> clicking on snapshot gives you the sources
> https://gitorious.org/cogvm/dmg-blessed?p=cogvm:dmg-blessed.git;a=summary
> non-functional jenkins setup
> https://ci.inria.fr/pharo-contribution/view/VM/job/CogDroid/configure-readonly/
>
>
>
> -------------
>
> The Cog VM crash when running on a Thread:
>
>
> D/jni-vm: Java_org_smalltalk_android_vm_VM_runVM
> D/jni-vm: runVM
> D/jni-vm: interpret
>
> A/libc: Fatal signal 8 (SIGFPE), code -6, fault addr 0x67db in tid 26636
> (Thread-5)
>
> Revision: '6'
> ABI: 'arm'
> pid: 26587, tid: 26636, name: Thread-5 >>> org.smalltalk.android <<<
> signal 8 (SIGFPE), code -6 (SI_TKILL), fault addr 0x67db
> r0 00000000 r1 0000680c r2 00000008 r3 00000000
> r4 e4f7f978 r5 00000008 r6 e4f7f920 r7 0000010c
> r8 e4f7ef60 r9 e3516400 sl e351648c fp e4f7ecb4
> ip 00000002 sp e4f7ce30 lr efca84c7 pc efcaad30 cpsr 600e0010
>
> backtrace:
> #00 pc 0004ad30 /system/lib/libc.so (tgkill+12)
> #01 pc 000484c3 /system/lib/libc.so (pthread_kill+34)
> #02 pc 0001dd99 /system/lib/libc.so (raise+10)
> #03 pc 000c54a3 /data/app/org.smalltalk.android-2/lib/arm/libStackVM.so
> #04 pc 00051507 /data/app/org.smalltalk.android-2/lib/arm/libStackVM.so
> #05 pc 0003d38b
> /data/app/org.smalltalk.android-2/lib/arm/libStackVM.so (interpret+238)
> #06 pc 000a4e6f
> /data/app/org.smalltalk.android-2/lib/arm/libStackVM.so (runVM+22)
> #07 pc 000a4a55
> /data/app/org.smalltalk.android-2/lib/arm/libStackVM.so
> (Java_org_smalltalk_android_vm_VM_runVM+36)
> #08 pc 0031ec99 /data/app/org.smalltalk.android-2/oat/arm/base.odex
> (offset 0x302000)
>
More information about the Squeak-dev
mailing list
|