[erlang-questions] Erlang in Debian on m68k architecture

Mikael Pettersson mikpe@REDACTED
Thu Jan 25 17:21:40 CET 2007


Sergei Golovan writes:
 > On 1/25/07, Mikael Pettersson <mikpe@REDACTED> wrote:
 > > The problem is still one of alignment. It seems that your M68K
 > > toolchain doesn't align
 > >
 > > struct { int x; } var;
 > >
 > > to a 32-bit boundary. Whether that is the bug, or whether the
 > > lock checker's alignment-of-static-data assumption is the bug,
 > > I cannot tell until someone sends me a pointer to the M68K Linux
 > > (or SVR4) ABI document.
 > 
 > Then I would like to ask another question: Are there other variables
 > in erlang, which must be aligned to a 32-bit boundary? Or fixing
 > erts_bin_alloc_mtx alignment is sufficient?

There are many many many places where alignment is required,
and where incorrect alignment could cause almost random and
impossible to debug problems.

It is possible to enforce alignment with directives, the problem
is locating all the relevant places, and to ensure that alignment
directives don't cause unexpected internal padding. (Yes there are
assumptions about that as well.)

Unless you're dying to use Erlang on M68K, don't bother.

/Mikael



More information about the erlang-questions mailing list