From fd9bb9fb7323ead417fff0cbb7a077b342446a77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 7 Apr 2010 13:18:24 +0200 Subject: erts: Fix loading of modules with invalid floating point arithmetic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The following program is supposed to cause an exception at run-time: foo() -> Sum1 = Sum2 = N = 2, pSum - (Sum1*(Sum2/N)). but the loader fails to load because it contains the following instruction: fconv {atom,pSum} {fr,2} Fix the loader so that it can handle fconv instructions where the first operand is a non-numeric literal. Reported-by: Torbjörn Törnkvist --- erts/emulator/beam/ops.tab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/emulator/beam') diff --git a/erts/emulator/beam/ops.tab b/erts/emulator/beam/ops.tab index 231ea34fd5..9e8ac74f40 100644 --- a/erts/emulator/beam/ops.tab +++ b/erts/emulator/beam/ops.tab @@ -1304,7 +1304,7 @@ fmul p FR1 FR2 FR3 => i_fmul FR1 FR2 FR3 fdiv p FR1 FR2 FR3 => i_fdiv FR1 FR2 FR3 fnegate p FR1 FR2 => i_fnegate FR1 FR2 -fconv Int=iq Dst=l => move Int x | fconv x Dst +fconv Arg=iqan Dst=l => move Arg x | fconv x Dst fmove q l fmove d l -- cgit v1.2.3