From e04704b1f40511a6e1090b4cb04ef543580cdcc7 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Tue, 15 Nov 2011 20:10:21 +0100 Subject: Iron out bugs in Win64 found in daily builds Almost all uses of the 'long' datatype is removed from VM and tests Emulator test now runs w/o drivers crashing Nasty abs bug fixed in VM as well as type errors in allocator debug functions Still one allocator test that fails, domain knowledge is needed to fix that. Fix type inconsistency in beam_load causing crashes --- erts/emulator/beam/beam_load.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'erts/emulator/beam/beam_load.c') diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c index d8434c098e..e6fbdc0d45 100644 --- a/erts/emulator/beam/beam_load.c +++ b/erts/emulator/beam/beam_load.c @@ -1434,7 +1434,7 @@ static int read_literal_table(LoaderState* stp) { int i; - BeamInstr uncompressed_sz; + uLongf uncompressed_sz; byte* uncompressed = 0; GetInt(stp, 4, uncompressed_sz); @@ -1444,7 +1444,7 @@ read_literal_table(LoaderState* stp) LoadError0(stp, "failed to uncompress literal table (constant pool)"); } stp->file_p = uncompressed; - stp->file_left = uncompressed_sz; + stp->file_left = (unsigned) uncompressed_sz; GetInt(stp, 4, stp->num_literals); stp->literals = (Literal *) erts_alloc(ERTS_ALC_T_LOADER_TMP, stp->num_literals * sizeof(Literal)); @@ -3500,7 +3500,6 @@ gen_jump_tab(LoaderState* stp, GenOpArg S, GenOpArg Fail, GenOpArg Size, GenOpAr } size = max - min + 1; - /* * Allocate structure and fill in the fixed fields. */ @@ -3532,7 +3531,7 @@ gen_jump_tab(LoaderState* stp, GenOpArg S, GenOpArg Fail, GenOpArg Size, GenOpAr op->a[i] = Fail; } for (i = 0; i < Size.val; i += 2) { - int index; + Sint index; index = fixed_args+Rest[i].val-min; ASSERT(fixed_args <= index && index < arity); op->a[index] = Rest[i+1]; -- cgit v1.2.3