diff options
author | Sverker Eriksson <[email protected]> | 2016-05-31 11:08:57 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-05-31 11:08:57 +0200 |
commit | 8305c497ffff7ccf7cb06635a18c84b3eb3c859f (patch) | |
tree | ce4ec997c823d2e9075b8e8f3e3893703e0ec5d8 /erts/emulator/beam/export.c | |
parent | 962b25f3b2879a48a8cd0596ffad862beb82d4d9 (diff) | |
parent | 770442cd4775a9bc56b3d0476754d8ea91ca2e2f (diff) | |
download | otp-8305c497ffff7ccf7cb06635a18c84b3eb3c859f.tar.gz otp-8305c497ffff7ccf7cb06635a18c84b3eb3c859f.tar.bz2 otp-8305c497ffff7ccf7cb06635a18c84b3eb3c859f.zip |
Merge branch 'sverker/bad-hash'
Diffstat (limited to 'erts/emulator/beam/export.c')
-rw-r--r-- | erts/emulator/beam/export.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/erts/emulator/beam/export.c b/erts/emulator/beam/export.c index 02c24557c1..2a19211987 100644 --- a/erts/emulator/beam/export.c +++ b/erts/emulator/beam/export.c @@ -31,7 +31,7 @@ #define EXPORT_INITIAL_SIZE 4000 #define EXPORT_LIMIT (512*1024) -#define EXPORT_HASH(m,f,a) ((m)*(f)+(a)) +#define EXPORT_HASH(m,f,a) ((atom_val(m) * atom_val(f)) ^ (a)) #ifdef DEBUG # define IF_DEBUG(x) x @@ -79,8 +79,7 @@ struct export_templ static struct export_blob* entry_to_blob(struct export_entry* ee) { - return (struct export_blob*) - ((char*)ee->ep - offsetof(struct export_blob,exp)); + return ErtsContainerStruct(ee->ep, struct export_blob, exp); } void |