aboutsummaryrefslogtreecommitdiffstats
path: root/erts/example/pg_encode2.c
diff options
context:
space:
mode:
authorMikael Pettersson <[email protected]>2010-09-27 19:21:51 +0200
committerBjörn Gustavsson <[email protected]>2010-09-30 14:58:37 +0200
commit3f367dad74735a863c3e072e51d6a9568b9d155d (patch)
treef1b432e5377d81793426ed50fee1747e5cb56014 /erts/example/pg_encode2.c
parent800a07c5a386a79465ad33e5015ba20bad2ccc62 (diff)
downloadotp-3f367dad74735a863c3e072e51d6a9568b9d155d.tar.gz
otp-3f367dad74735a863c3e072e51d6a9568b9d155d.tar.bz2
otp-3f367dad74735a863c3e072e51d6a9568b9d155d.zip
fix 64-bit writes to 32-bit struct field in HiPE runtime
In the HiPE part of the runtime system's Process struct there is a state field which is 32 bits wide even on 64-bit machines. There is a single instruction in the HiPE AMD64 runtime where this field is incorrectly written with a 64-bit store. Luckily the extraneous 32 bits are written as zeros to 4 bytes of tail-padding at the end of the struct, so nothing should have broken because of this. The same bug exists in the HiPE PowerPC64 runtime (in development), but on the big-endian PPC64 the effect is to write the actual value to the tail-padding and zero to the struct field, which potentially breaks TRAPs from BIFs (depending on BIF arities and how many parameter registers the runtime has been configured to use). Thanks to Paul Guyot for noticing the oversized write on AMD64.
Diffstat (limited to 'erts/example/pg_encode2.c')
0 files changed, 0 insertions, 0 deletions