diff options
author | Björn Gustavsson <[email protected]> | 2019-04-12 13:09:41 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2019-04-12 15:07:38 +0200 |
commit | 256824fc2e441c549a39197bdae9ba8721709a8b (patch) | |
tree | 11b2224d5486e1495b5e367d896cacd322cad5a0 /erts/emulator | |
parent | f8d1787cd7accb1e6aabeec43bb7eaec66467852 (diff) | |
download | otp-256824fc2e441c549a39197bdae9ba8721709a8b.tar.gz otp-256824fc2e441c549a39197bdae9ba8721709a8b.tar.bz2 otp-256824fc2e441c549a39197bdae9ba8721709a8b.zip |
crash dump: Fix printing of "OldBinVHeap unused"
During a garbage collection, there could have been an overflow
in the old virtual heap.
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/beam/break.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/erts/emulator/beam/break.c b/erts/emulator/beam/break.c index 06d8c7cda8..80e871aaf6 100644 --- a/erts/emulator/beam/break.c +++ b/erts/emulator/beam/break.c @@ -394,8 +394,12 @@ print_process_info(fmtfn_t to, void *to_arg, Process *p, ErtsProcLocks orig_lock erts_print(to, to_arg, "OldBinVHeap: %b64u\n", BIN_OLD_VHEAP(p)); erts_print(to, to_arg, "BinVHeap unused: %b64u\n", BIN_VHEAP_SZ(p) - p->off_heap.overhead); - erts_print(to, to_arg, "OldBinVHeap unused: %b64u\n", - BIN_OLD_VHEAP_SZ(p) - BIN_OLD_VHEAP(p)); + if (BIN_OLD_VHEAP_SZ(p) >= BIN_OLD_VHEAP(p)) { + erts_print(to, to_arg, "OldBinVHeap unused: %b64u\n", + BIN_OLD_VHEAP_SZ(p) - BIN_OLD_VHEAP(p)); + } else { + erts_print(to, to_arg, "OldBinVHeap unused: overflow\n"); + } erts_print(to, to_arg, "Memory: %beu\n", erts_process_memory(p, !0)); if (garbing) { |