diff options
author | Sverker Eriksson <[email protected]> | 2018-03-20 16:48:26 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2018-03-20 16:48:26 +0100 |
commit | 1ac8caa8d22f3767e84e7be749afbd5ed17a11b4 (patch) | |
tree | 63e0e6653e2dc0872a9c5a9a1b35246c80a4d8d9 /erts/emulator/hipe | |
parent | 2bdd0ba8f6046301778ea3673716d8df9fdd42fa (diff) | |
download | otp-1ac8caa8d22f3767e84e7be749afbd5ed17a11b4.tar.gz otp-1ac8caa8d22f3767e84e7be749afbd5ed17a11b4.tar.bz2 otp-1ac8caa8d22f3767e84e7be749afbd5ed17a11b4.zip |
erts: Fix some zero size sys_memcpy
Diffstat (limited to 'erts/emulator/hipe')
-rw-r--r-- | erts/emulator/hipe/hipe_mode_switch.c | 3 |
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 8b497c9970..f2befb07e3 100644 --- a/erts/emulator/hipe/hipe_mode_switch.c +++ b/erts/emulator/hipe/hipe_mode_switch.c @@ -662,7 +662,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) |