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/erl_nif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'erts/emulator/beam/erl_nif.c') diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c index bf73c076e0..143f631f58 100644 --- a/erts/emulator/beam/erl_nif.c +++ b/erts/emulator/beam/erl_nif.c @@ -531,7 +531,7 @@ int enif_alloc_binary(size_t size, ErlNifBinary* bin) } refbin->flags = BIN_FLAG_DRV; /* BUGBUG: Flag? */ erts_refc_init(&refbin->refc, 1); - refbin->orig_size = (long) size; + refbin->orig_size = (SWord) size; bin->size = size; bin->data = (unsigned char*) refbin->orig_bytes; @@ -801,7 +801,7 @@ int enif_get_ulong(ErlNifEnv* env, Eterm term, unsigned long* ip) unsigned int tmp; ret = enif_get_uint(env,term,&tmp); if (ret) { - *ip = (long) tmp; + *ip = (unsigned long) tmp; } return ret; #else -- cgit v1.2.3