Thu Apr 17 11:15:57 CEST 2003
From: "Pierpaolo BERNARDI" <bernardp@REDACTED>
> this looks like a serious bug.
The compiled code for my function uses 1034 registers:
while the vm has a hard limit of 1024, from erl_vm.h:
#define MAX_REG 1024 /* Max number of x(N) registers used */
If there must be a hard limit on the number of registers,
the solution looks simple: the compiler must check
that this limit is not violated, and issue an appropriate
diagnostic if it is.
BTW, it seems to me that the function can be compiled using
only a handful of registers, interleaving the creation of the list
elements with the creation of the list spine. Alas, I'm not
familiar with the compiler and cannot estimate how difficult
would be this change.
More information about the erlang-questions