diff options
author | Björn Gustavsson <[email protected]> | 2012-10-01 09:50:13 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2012-10-01 09:50:13 +0200 |
commit | a4a8f703c4ef1fa0f8ab9f597afa3a8e3e0e1f28 (patch) | |
tree | d7b8e2a6bfc0f9aed08484cd1d595a8806d736eb | |
parent | 8190314f39d0f3c7fd5686168aa8861836c6ad65 (diff) | |
parent | 88b22baff3dbe0bf672fe1c96131ff707c888bcf (diff) | |
download | otp-a4a8f703c4ef1fa0f8ab9f597afa3a8e3e0e1f28.tar.gz otp-a4a8f703c4ef1fa0f8ab9f597afa3a8e3e0e1f28.tar.bz2 otp-a4a8f703c4ef1fa0f8ab9f597afa3a8e3e0e1f28.zip |
Merge branch 'bjorn/erts/crash-dump-fix'
* bjorn/erts/crash-dump-fix:
Fix missing information in crash dump for native-compiled modules
-rw-r--r-- | erts/emulator/beam/beam_load.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c index d3f55a2ba4..25ae480dc7 100644 --- a/erts/emulator/beam/beam_load.c +++ b/erts/emulator/beam/beam_load.c @@ -5527,7 +5527,8 @@ stub_copy_info(LoaderState* stp, int chunk, /* Chunk: ATTR_CHUNK or COMPILE_CHUNK */ byte* info, /* Where to store info. */ BeamInstr* ptr_word, /* Where to store pointer into info. */ - BeamInstr* size_word) /* Where to store size of info. */ + BeamInstr* size_word, /* Where to store size into info. */ + BeamInstr* size_on_heap_word) /* Where to store size on heap. */ { Sint decoded_size; Uint size = stp->chunks[chunk].size; @@ -5538,7 +5539,8 @@ stub_copy_info(LoaderState* stp, if (decoded_size < 0) { return 0; } - *size_word = decoded_size; + *size_word = (BeamInstr) size; + *size_on_heap_word = decoded_size; } return info + size; } @@ -5960,12 +5962,16 @@ erts_make_stub_module(Process* p, Eterm Mod, Eterm Beam, Eterm Info) info = (byte *) fp; info = stub_copy_info(stp, ATTR_CHUNK, info, - code+MI_ATTR_PTR, code+MI_ATTR_SIZE_ON_HEAP); + code+MI_ATTR_PTR, + code+MI_ATTR_SIZE, + code+MI_ATTR_SIZE_ON_HEAP); if (info == NULL) { goto error; } info = stub_copy_info(stp, COMPILE_CHUNK, info, - code+MI_COMPILE_PTR, code+MI_COMPILE_SIZE_ON_HEAP); + code+MI_COMPILE_PTR, + code+MI_COMPILE_SIZE, + code+MI_COMPILE_SIZE_ON_HEAP); if (info == NULL) { goto error; } |