3 /* This is a simplified version of what Emacs does internally,
4 when marking its stack. */
6 static unsigned long sum
;
7 static void *stack_base
;
9 /* A simple substitute for what Emacs actually does. */
11 mark_maybe_pointer (void *p
)
13 sum
^= (unsigned long) p
;
16 static inline void __attribute__ ((no_sanitize_address
))
17 mark_memory (void **start
, void **end
)
28 for (pp
= start
; pp
< end
; pp
++)
30 /* This is the dereference that we don't want sanitized. */
33 mark_maybe_pointer (p
);
41 mark_memory (stack_base
, &end
);
45 garbage_collect (void)