aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-03-21 19:51:56 +0100
committerSverker Eriksson <[email protected]>2018-03-21 19:51:56 +0100
commit5baf6948b10a47b9535750798898ed6b84c27039 (patch)
treead17b8c934e01cc9a4a06aaa0b96c6db9ef1aa3c /erts/emulator/hipe
parentcf3cbf0871832cb0808293842e5ae726edfc12e1 (diff)
parent1ac8caa8d22f3767e84e7be749afbd5ed17a11b4 (diff)
downloadotp-5baf6948b10a47b9535750798898ed6b84c27039.tar.gz
otp-5baf6948b10a47b9535750798898ed6b84c27039.tar.bz2
otp-5baf6948b10a47b9535750798898ed6b84c27039.zip
Merge branch 'sverker/inline-sys_memcpy' again
* sverker/inline-sys_memcpy: erts: Fix some zero size sys_memcpy
Diffstat (limited to 'erts/emulator/hipe')
-rw-r--r--erts/emulator/hipe/hipe_mode_switch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/hipe/hipe_mode_switch.c b/erts/emulator/hipe/hipe_mode_switch.c
index 6af514d4ba..bc9a700204 100644
--- a/erts/emulator/hipe/hipe_mode_switch.c
+++ b/erts/emulator/hipe/hipe_mode_switch.c
@@ -664,7 +664,8 @@ void hipe_inc_nstack(Process *p)
Eterm *new_nstack = erts_alloc(ERTS_ALC_T_HIPE_STK, new_size*sizeof(Eterm));
unsigned used_size = p->hipe.nstend - p->hipe.nsp;
- sys_memcpy(new_nstack+new_size-used_size, p->hipe.nsp, used_size*sizeof(Eterm));
+ if (used_size)
+ sys_memcpy(new_nstack+new_size-used_size, p->hipe.nsp, used_size*sizeof(Eterm));
if (p->hipe.nstgraylim)
p->hipe.nstgraylim = new_nstack + new_size - (p->hipe.nstend - p->hipe.nstgraylim);
if (p->hipe.nstblacklim)