aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-10-06 20:09:21 +0200
committerSverker Eriksson <[email protected]>2016-10-14 14:37:20 +0200
commit6cd1469d0c8f9af602332b20772134c1241f6429 (patch)
treeeb2072fb4a24d48613505248fa945b996d9867fe /erts/emulator/hipe
parent65fbc0464cce8266024129fcf10ef0906f907eb4 (diff)
downloadotp-6cd1469d0c8f9af602332b20772134c1241f6429.tar.gz
otp-6cd1469d0c8f9af602332b20772134c1241f6429.tar.bz2
otp-6cd1469d0c8f9af602332b20772134c1241f6429.zip
erts: Fix bug in stack walk on risc
Symptom: Got ra==NULL at nsp==nsp_end when running basic_SUITE:basic_arith on arm why has this not been detected before?
Diffstat (limited to 'erts/emulator/hipe')
-rw-r--r--erts/emulator/hipe/hipe_risc_stack.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/erts/emulator/hipe/hipe_risc_stack.c b/erts/emulator/hipe/hipe_risc_stack.c
index 7528a3ab00..4001bedeb6 100644
--- a/erts/emulator/hipe/hipe_risc_stack.c
+++ b/erts/emulator/hipe/hipe_risc_stack.c
@@ -292,7 +292,7 @@ int hipe_fill_stacktrace(Process *p, int depth, Eterm **trace)
ra = (unsigned long)p->hipe.nra;
prev_ra = 0;
i = 0;
- for (;;) {
+ while (nsp < nsp_end) {
if (ra == (unsigned long)nbif_stack_trap_ra)
ra = (unsigned long)p->hipe.ngra;
if (ra != prev_ra) {
@@ -302,8 +302,6 @@ int hipe_fill_stacktrace(Process *p, int depth, Eterm **trace)
break;
prev_ra = ra;
}
- if (nsp >= nsp_end)
- break;
sdesc = hipe_find_sdesc(ra);
nsp += arity + sdesc_fsize(sdesc);
arity = sdesc_arity(sdesc);