aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_stack.h
diff options
context:
space:
mode:
authorMagnus Lång <[email protected]>2016-05-23 15:41:31 +0200
committerMagnus Lång <[email protected]>2016-07-06 16:08:20 +0200
commitf0131c58c42a286c8b3f611b47106393a37197b6 (patch)
treecaefc37baef32b065e69f23cc363a83ff70dcd12 /erts/emulator/hipe/hipe_stack.h
parent3b409021a70427bb2fe3834707edf822b6afce2d (diff)
downloadotp-f0131c58c42a286c8b3f611b47106393a37197b6.tar.gz
otp-f0131c58c42a286c8b3f611b47106393a37197b6.tar.bz2
otp-f0131c58c42a286c8b3f611b47106393a37197b6.zip
check_process_code: Sweep HiPE stack for literals
Because check_process_code neglected checking the HiPE stack for references to the literal area, such references would survive the purge and subsequent deletion of a module and its literal area. These dangling references would then cause incorrect behaviour or even hard crashes of the VM. By simply adding a scan of the HiPE stack to check_process_code and erts_garbage_collect_literals, this problem is fixed. In order to support full stack walks without deleting the graylimit trap, a new stack walking interface function, nstack_walk_init_sdesc_ignore_trap() was introduced.
Diffstat (limited to 'erts/emulator/hipe/hipe_stack.h')
-rw-r--r--erts/emulator/hipe/hipe_stack.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/hipe/hipe_stack.h b/erts/emulator/hipe/hipe_stack.h
index 4ea7d5c031..afa0ed4256 100644
--- a/erts/emulator/hipe/hipe_stack.h
+++ b/erts/emulator/hipe/hipe_stack.h
@@ -131,5 +131,8 @@ static __inline__ void hipe_check_nstack(Process *p, unsigned nwords)
*/
extern Eterm *fullsweep_nstack(Process *p, Eterm *n_htop);
extern void gensweep_nstack(Process *p, Eterm **ptr_old_htop, Eterm **ptr_n_htop);
+extern Eterm *sweep_literals_nstack(Process *p, Eterm *n_htop, char *area,
+ Uint area_size);
+extern int nstack_any_heap_ref_ptrs(Process *, char* mod_start, Uint mod_size);
#endif /* HIPE_STACK_H */