pussuw commented on PR #7966: URL: https://github.com/apache/nuttx/pull/7966#issuecomment-1385239056
Ok, time to abandon this. I realize that this patch is incomplete and the alternate approach is needed instead: > Another option would be to store the address environment only here but that gets a bit dirty IMO. It would require changing group->tg_addrenv into a pointer and allocating it from kheap. There are several issues with usage of the pair `up_addrenv_select(&newenv, &oldenv)` and `up_addrenv_restore(&oldenv)` . If a context switch happens between those, the system crashes when the context restore is attempted, because the wrong address environment is instantiated. The process thinks it is using "newenv" but the context restore procedure restores "oldenv". "oldenv" in this case is the process's own address environment (group->tg_addrenv). This same issue can be found in several other places too. So I will create patches that decouple storing the address environment from group to its own container and fix all related errors. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org