diff options
author | Sverker Eriksson <[email protected]> | 2017-02-21 15:03:30 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2017-02-21 15:25:37 +0100 |
commit | faaf8ffe2902de80c91fbed1e74b062b94edd792 (patch) | |
tree | 67a64c235ff26949eb696622ddc38b97a25ecf5b /erts/emulator/beam/break.c | |
parent | 808b2f4d53e446aed07f85716c5c4b85abb3d18a (diff) | |
download | otp-faaf8ffe2902de80c91fbed1e74b062b94edd792.tar.gz otp-faaf8ffe2902de80c91fbed1e74b062b94edd792.tar.bz2 otp-faaf8ffe2902de80c91fbed1e74b062b94edd792.zip |
erts: Fix literal size bug when only old instance exists
fix for already merged but not releases 808b2f4d53e446aed07f85716c5c4b85abb3d18a
Diffstat (limited to 'erts/emulator/beam/break.c')
-rw-r--r-- | erts/emulator/beam/break.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/erts/emulator/beam/break.c b/erts/emulator/beam/break.c index 5d34c83c1a..71934e1376 100644 --- a/erts/emulator/beam/break.c +++ b/erts/emulator/beam/break.c @@ -381,10 +381,12 @@ info(fmtfn_t to, void *to_arg) static int code_size(struct erl_module_instance* modi) { - ErtsLiteralArea* lit = modi->code_hdr->literal_area; int size = modi->code_length; - if (lit) { - size += (lit->end - lit->start) * sizeof(Eterm); + + if (modi->code_hdr) { + ErtsLiteralArea* lit = modi->code_hdr->literal_area; + if (lit) + size += (lit->end - lit->start) * sizeof(Eterm); } return size; } |