aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-07-16 17:50:04 +0200
committerSverker Eriksson <[email protected]>2018-07-16 17:50:04 +0200
commit75bc236b4f6971388f256426a6455cdb4893d410 (patch)
tree248539385a212ad618149f494eb6a2f46c4d5c22
parent2e51ef8d76ba0d0b700a673262292f7e63ba9c58 (diff)
parent346494638829cb4440aea106dbfc3ede45e1d274 (diff)
downloadotp-75bc236b4f6971388f256426a6455cdb4893d410.tar.gz
otp-75bc236b4f6971388f256426a6455cdb4893d410.tar.bz2
otp-75bc236b4f6971388f256426a6455cdb4893d410.zip
Merge branch 'sverker/crash-dump-crash-literals/OTP-15181' into maint
* sverker/crash-dump-crash-literals/OTP-15181: erts: Fix bug in crash dump generation
-rw-r--r--erts/emulator/beam/beam_ranges.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/erts/emulator/beam/beam_ranges.c b/erts/emulator/beam/beam_ranges.c
index f0c9496341..9f3153724a 100644
--- a/erts/emulator/beam/beam_ranges.c
+++ b/erts/emulator/beam/beam_ranges.c
@@ -35,10 +35,8 @@ typedef struct {
/*
* Used for crash dumping of literals. The size of erts_dump_lit_areas is
- * always twice the number of active ranges (to allow for literals in both
- * current and old code).
+ * always at least the number of active ranges.
*/
-
ErtsLiteralArea** erts_dump_lit_areas;
Uint erts_dump_num_lit_areas;
@@ -180,8 +178,8 @@ erts_end_staging_ranges(int commit)
(erts_aint_t) (r[dst].modules +
r[dst].n / 2));
- if (r[dst].allocated * 2 > erts_dump_num_lit_areas) {
- erts_dump_num_lit_areas *= 2;
+ if (r[dst].allocated > erts_dump_num_lit_areas) {
+ erts_dump_num_lit_areas = r[dst].allocated * 2;
erts_dump_lit_areas = (ErtsLiteralArea **)
erts_realloc(ERTS_ALC_T_CRASH_DUMP,
(void *) erts_dump_lit_areas,