sim: fix sim runtime err under sanitize check mode.
since gcc sanitize can not stub proper code in nuttx kernel code.
This commit is contained in:
parent
2d4906ab9b
commit
c82a676630
@ -26,6 +26,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#ifdef CONFIG_SIM_ASAN
|
||||
#include <sanitizer/asan_interface.h>
|
||||
#endif
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
@ -83,4 +86,7 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
tcb->adj_stack_size -
|
||||
sizeof(xcpt_reg_t);
|
||||
tcb->xcp.regs[JB_PC] = (xcpt_reg_t)tcb->start;
|
||||
#ifdef CONFIG_SIM_ASAN
|
||||
__asan_unpoison_memory_region(tcb->stack_alloc_ptr, tcb->adj_stack_size);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user