[erlang-bugs] Integer truncation in binary conversion considered harmful

Bjorn Gustavsson bgustavsson@REDACTED
Tue Aug 26 09:24:02 CEST 2008


On Tue, Aug 26, 2008 at 8:46 AM, Edwin Fine
<erlang-questions_efine@REDACTED>wrote:

> How difficult could it be to add *optional* run-time checking to detect
> this condition without a serious risk of adverse effects on the correctness
> of Erlang run-time execution?
>

If checking is turned on for the entire run-time system, library code that
depends on the truncation could fail.

I think it would be better to add optional support in the compiler to turn
on checks (either for an entire module, or for individual segments of
a binary).

If someone writes an EEP, we will consider implementing it.

/Bjorn
-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20080826/334e047e/attachment.htm>


More information about the erlang-bugs mailing list