aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2014-10-29 17:11:31 +0100
committerSverker Eriksson <[email protected]>2014-10-29 17:11:31 +0100
commit5b4cb838afbe9e700139f810a1c4c9b0e91c511c (patch)
tree3da49e88ace06d08fedd3dca309763b67ce8874a
parent743ed31108ee555db18d9833186865e85e34333e (diff)
downloadotp-5b4cb838afbe9e700139f810a1c4c9b0e91c511c.tar.gz
otp-5b4cb838afbe9e700139f810a1c4c9b0e91c511c.tar.bz2
otp-5b4cb838afbe9e700139f810a1c4c9b0e91c511c.zip
erts: Fix bug in beam_ranges
Symptom: VM on OSX (darwin11.4.2) with +Meamin running sasl tests, crashing when init:reboot() does erlang:purge_module(installer). Problem: Off-by-one bug in beam_ranges:find_range, returning the wrong range if the 'end' of one module is the 'start' of the next. This is only possible if using sys_alloc (+Meamin) as our own allocators always put block headers between allocated payload data.
-rw-r--r--erts/emulator/beam/beam_ranges.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/beam_ranges.c b/erts/emulator/beam/beam_ranges.c
index 0f2d5d0c2a..cb6470638f 100644
--- a/erts/emulator/beam/beam_ranges.c
+++ b/erts/emulator/beam/beam_ranges.c
@@ -282,7 +282,7 @@ find_range(BeamInstr* pc)
while (low < high) {
if (pc < mid->start) {
high = mid;
- } else if (pc > RANGE_END(mid)) {
+ } else if (pc >= RANGE_END(mid)) {
low = mid + 1;
} else {
erts_smp_atomic_set_nob(&r[active].mid, (erts_aint_t) mid);