You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compiler does an unsafe optimization of the code of the following lines in {{socket}}:
https://github.com/erlang/otp/blob/f3e3ceb55/erts/preloaded/src/socket.erl#L2207-L2239
The compiler will apply the optimization that avoids scanning the entire message. In this function, the optimization is unsafe because the receive marker will be set, but the function can return without entering the {{receive}}.
This optimization causes the bug in {{socket}} described by this email to Erlang Questions:
http://erlang.org/pipermail/erlang-questions/2019-October/098591.html
The text was updated successfully, but these errors were encountered:
As a nitpick, I would suggest editing the link to the code excerpt in the description and refer to a specific commit[*], so that it doesn't risk pointing to a different piece of code in the future (it's currently pointing to `master`.)
(I've shot myself in the foot more than once with this sort of thing.)
[*]: https://github.com/erlang/otp/blob/f3e3ceb55/erts/preloaded/src/socket.erl#L2207-L2239
Original reporter:
bjorn
Affected version:
OTP-22.1
Component:
compiler
Migrated from: https://bugs.erlang.org/browse/ERL-1076
The text was updated successfully, but these errors were encountered: