Re: Name Service Crashes on ARM-Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

JamVM uses its own optimised routines for handling the calling
convention on ARM (os/linux/arm/callNative.S).  This was written back
in 2003.  From browsing, it appears that a new ARM calling convention
is  gainining ground called EABI (E for embedded).  This is
substantially different, and requires the stack and doubleword
quantities to be 8-byte aligned (stacked, and within even-numbered
registers).

I haven't been able to find a definate answer whether the gumstix is
configured to use EABI.  Assuming your ARM cross-compiler is called
arm-linux-gcc, do:

arm-linux-gcc -E -dM - < /dev/null

This will show all the predefined macros.  If it's configured to use
EABI, there should be __ARM_EABI__ somewhere in that.

If it is, you will have to use libffi.  This library provides a
standard generic way for handling calling conventions.  It can be used
with JamVM by adding --enable-ffi to the configure line.  This will
configure JamVM to use libffi instead of its own routines.

Most other VMs rely on libffi for calling native methods so JamVM
wouldn't be odd in requiring it.  JamVM, however, provided its own
routines as an optimisation.  Depending on how much time I have over
the next week I will investigate writing a new set of routines to
handle EABI.

Rob.

On 8/18/07, robert@xxxxxxxxxxxxxx <robert@xxxxxxxxxxxxxx> wrote:
> Quoting Audrius Meskauskas <audriusa@xxxxxxxxxx>:
>
> > Adam Smola wrote:
>
> > > # java gnu.classpath.tools.giop.NameService
> > >
> > > Error:
> > >
> > > Please use --help for options.
> > > Alignment trap: not handling instruction ececa102 at [<4008bde8>]
> > > Unhandled fault: alignment exception (0x813) at 0xbea8bff4
> >
> > That is not a java error. Java code would print the stack trace on
> > failure. This seems a native code problem.
>
> Some ideas for the original poster.
> (1) execute jamvm with -verbose option (might be able to
> see what jamvm is trying to do when error occurs)
> (2) recompile jamvm with debug options in jamvm.mk,
> in particular there is an option --debug-dll iirc.
> (3) build strace and run jamvm within strace
> (extremely verbose output, might give some useful info
> at the point of failure)
>
> HTH
>
> Robert Dodier
>
>


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux