aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-10-30 10:15:12 +0100
committerBjörn Gustavsson <[email protected]>2017-10-30 10:15:12 +0100
commit3ffdb15e2315a0ad784f1b45db97c3748325e567 (patch)
treef383983d17dd78b96f0b9385937a4d4c6353c291
parent01a5cce41b7e37bccf20c47ef149ed63bb1f3edc (diff)
parentc9765df137370b692cd9476ff5a4d00122b2ba93 (diff)
downloadotp-3ffdb15e2315a0ad784f1b45db97c3748325e567.tar.gz
otp-3ffdb15e2315a0ad784f1b45db97c3748325e567.tar.bz2
otp-3ffdb15e2315a0ad784f1b45db97c3748325e567.zip
Merge branch 'bjorn/improve-crash-dumps/OTP-14685' into maint
* bjorn/improve-crash-dumps/OTP-14685: erl_process_dump: Don't assume that literals can be found
-rw-r--r--erts/emulator/beam/erl_process_dump.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_process_dump.c b/erts/emulator/beam/erl_process_dump.c
index 9fd024cae8..5641195458 100644
--- a/erts/emulator/beam/erl_process_dump.c
+++ b/erts/emulator/beam/erl_process_dump.c
@@ -728,8 +728,15 @@ static void mark_literal(Eterm* ptr)
ap = bsearch(ptr, lit_areas, num_lit_areas, sizeof(ErtsLiteralArea*),
search_areas);
- ASSERT(ap);
- ap[0]->off_heap = (struct erl_off_heap_header *) 1;
+
+ /*
+ * If the literal was created by native code, this search will not
+ * find it and ap will be NULL.
+ */
+
+ if (ap) {
+ ap[0]->off_heap = (struct erl_off_heap_header *) 1;
+ }
}