1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

OpenWRT: Disable mprotect of ST. 5.0.16

This commit is contained in:
winlin 2021-10-03 19:32:06 +08:00
parent cae35d7a6e
commit 8ea9783de7
5 changed files with 61 additions and 33 deletions

View file

@ -89,8 +89,9 @@ _st_stack_t *_st_stack_new(int stack_size)
ts->stk_size = stack_size;
ts->stk_bottom = ts->vaddr + REDZONE;
ts->stk_top = ts->stk_bottom + stack_size;
#ifdef DEBUG
/* For example, in OpenWRT, the memory at the begin minus 16B by mprotect is read-only. */
#if defined(DEBUG) && !defined(MD_NO_PROTECT)
mprotect(ts->vaddr, REDZONE, PROT_NONE);
mprotect(ts->stk_top + extra, REDZONE, PROT_NONE);
#endif