Tony Rogvall tony@REDACTED
Tue Nov 30 10:29:44 CET 1999

Hi there!

I have found a potential problem in erl_arith.c. I found it while
working on a for building standalone apps. (I modified the
sae stuff to link with a shared object, this makes it possible to write
small "real" executable as well)

The problem:

in erl_arith.c the tmp_big_buff is declared as

static Eterm tmp_big_buff[4];

and is used for temporary bignums, but on what address do you find

this buffer MUST be safe_allocated!


in erl_arith.c

static Eterm* tmp_big_buff;

void init_arith()
      tmp_big_buff = (Eterm*) safe_alloc(sizeof(Eterm)*4);

in beam_emu (or some other place)

void init_emulator()


and some declaration in global.h

I did not want to send a patch since this must be given some thought?


More information about the erlang-questions mailing list