aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-03-18 18:34:24 +0100
committerBjörn-Egil Dahlberg <[email protected]>2015-03-19 14:57:56 +0100
commita8599e3fbeb4628268f8761cbb1102d24d552133 (patch)
tree1171c354081ae612ed4f6b35ed3e4b4c0836a465
parentf237e9d4532ce72e88091ffe190a8c252d81d91f (diff)
downloadotp-a8599e3fbeb4628268f8761cbb1102d24d552133.tar.gz
otp-a8599e3fbeb4628268f8761cbb1102d24d552133.tar.bz2
otp-a8599e3fbeb4628268f8761cbb1102d24d552133.zip
erts: Fix bug in ESTACK and WSTACK
The [ew]default field would get uninitialised when the stack was saved and later restored. Detected by valgrind.
-rw-r--r--erts/emulator/beam/global.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h
index ef7a183d08..42daa2c9ef 100644
--- a/erts/emulator/beam/global.h
+++ b/erts/emulator/beam/global.h
@@ -426,6 +426,7 @@ do {\
memcpy((dst)->start, (s).start,_wsz*sizeof(Eterm));\
(dst)->sp = (dst)->start + _wsz;\
(dst)->end = (dst)->start + DEF_ESTACK_SIZE;\
+ (dst)->edefault = NULL;\
(dst)->alloc_type = (s).alloc_type;\
} else\
*(dst) = (s);\
@@ -593,6 +594,7 @@ do {\
memcpy((dst)->wstart, s.wstart,_wsz*sizeof(UWord));\
(dst)->wsp = (dst)->wstart + _wsz;\
(dst)->wend = (dst)->wstart + DEF_WSTACK_SIZE;\
+ (dst)->wdefault = NULL;\
(dst)->alloc_type = s.alloc_type;\
} else\
*(dst) = s;\