Fatal exceptions on context-switching for more than two isolated threads
Utkarsh Rai
utkarsh.rai60 at gmail.com
Sat Sep 19 11:41:00 UTC 2020
Hello,
When I isolate more than two threads in RTEMS (the implementation can be
found here
<https://github.com/ur10/rtems/commit/314dae32156aa3d1f54f1ee104b26604a32cae4f>),
I get fatal exceptions while context-switching. On stepping into the code,
the problem seems to be with the _User_extensions_Thread_*() call just
after a context-switch, in particular when the iterators are initialized
inside this call. The issue is the fact that we mark the stack space of the
switched out thread as 'NO_ACESS' and then try to access iterators(which
belong to the stack space of the switched-out thread) from a different
thread, which leads to fatal exceptions.
I am not sure how to handle this issue because I am not very clear on the
purpose of the "user extension" functionality or its implementation. Any
help would be appreciated, as this may possibly be the last hurdle for a
mergeable thread stack isolation feature.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200919/af774203/attachment.html>
More information about the devel
mailing list