diff options
author | Magnus Lång <[email protected]> | 2016-04-29 16:18:23 +0200 |
---|---|---|
committer | Magnus Lång <[email protected]> | 2016-04-29 16:31:32 +0200 |
commit | e48518e4520146d4b8461689c2aab5882478339f (patch) | |
tree | 3f1389580e4d0ea6860faffc7e665e2ea3f3711a /erts | |
parent | 06fe4914224a7172a60d318e15885841981b746d (diff) | |
download | otp-e48518e4520146d4b8461689c2aab5882478339f.tar.gz otp-e48518e4520146d4b8461689c2aab5882478339f.tar.bz2 otp-e48518e4520146d4b8461689c2aab5882478339f.zip |
erl_process: Restore R18 HiPE PCB offsets
It was recently observed that the LLVM backend for HiPE was broken,
generating code that crashes the VM.
It turns out that this was caused by LLVM hard-coding an offset into the
Erlang PCB, which became incorrect as of commit 3ac08f9b, that
introduced a new member into the PCB before the HiPE-specific state,
changing its offsets.
For now, until a proper fix is implemented, we move this new member to
after the HiPE-specific state, allowing the LLVM backend to work once
more.
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/beam/erl_process.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_process.h b/erts/emulator/beam/erl_process.h index 61acf5924b..1c01d705a7 100644 --- a/erts/emulator/beam/erl_process.h +++ b/erts/emulator/beam/erl_process.h @@ -925,7 +925,6 @@ struct process { Eterm* stop; /* Stack top */ Eterm* heap; /* Heap start */ Eterm* hend; /* Heap end */ - Eterm* abandoned_heap; Uint heap_sz; /* Size of heap in words */ Uint min_heap_size; /* Minimum size of heap (in words). */ Uint min_vheap_size; /* Minimum size of virtual heap (in words). */ @@ -941,6 +940,16 @@ struct process { #endif /* + * Moved to after "struct hipe_process_state hipe", as a temporary fix for + * LLVM hard-coding offsetof(struct process, hipe.nstack) (sic!) + * (see void X86FrameLowering::adjustForHiPEPrologue(...) in + * lib/Target/X86/X86FrameLowering.cpp). + * + * Used to be below "Eterm* hend". + */ + Eterm* abandoned_heap; + + /* * Saved x registers. */ Uint arity; /* Number of live argument registers (only valid |