erlc bug: no_bs_match_state (OTP-R10B-10 / compiler-4.3.12)

Bjorn Gustavsson bjorn@REDACTED
Fri Apr 21 08:56:31 CEST 2006


Pascal Brisset <pascal.brisset@REDACTED> writes:
> 
> The problem also occurs whenever a guard allocates memory;
> for example "foo(<<Rest/binary>>) when Rest/=[0]".
> 
> I'm not sure how this should be fixed.  The GC could scan the
> pointers in erts_mb and erts_save_mb.  Or the allocator could
> be prevented from relocating data while a binary match is in
> progress.

We have re-designed the bit syntax matching instructions in R11B
to resolve this issue (and a few others).

> 
> Maybe earlier versions of erlc also generate "unsafe" code which
> goes unnoticed because they don't have beam_validator.  Or maybe
> there is no risk at all and the validator is too strict.
> 

Yes, earlier version of the Erlang compiler did generate unsafe
code. The beam_validator is right.

/Bjorn

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-bugs mailing list