Central | spec/rtems: fix clobbered local in task restart validation (!13)
Sebastian Huber (@sebhub)
gitlab at rtems.org
Tue Oct 7 23:26:56 UTC 2025
Merge request https://gitlab.rtems.org/rtems/prequal/rtems-central/-/merge_requests/13 was reviewed by Sebastian Huber
--
Sebastian Huber started a new discussion on spec/rtems/task/req/restart.yml: https://gitlab.rtems.org/rtems/prequal/rtems-central/-/merge_requests/13#note_133953
>
> - if ( setjmp( ctx->thread_dispatch_context ) == 0 ) {
> + int jumped = setjmp( ctx->thread_dispatch_context );
I am surprised that this didn't trigger new warnings. This is undefined behaviour in standard C. You can't assign the result of setjmp() to an object.
--
Sebastian Huber started a new discussion on spec/rtems/task/req/restart.yml: https://gitlab.rtems.org/rtems/prequal/rtems-central/-/merge_requests/13#note_133954
> SetFatalHandler( ResumeThreadDispatch, ctx );
> cpu_self = _Thread_Dispatch_disable();
I would make this `(void) _Thread_Dispatch_disable();`
--
Sebastian Huber started a new discussion on spec/rtems/task/req/restart.yml: https://gitlab.rtems.org/rtems/prequal/rtems-central/-/merge_requests/13#note_133955
> Block( ctx );
> } else {
> _Thread_Dispatch_unnest( cpu_self );
Here: `_Thread_Dispatch_unnest(_Per_CPU_Get())`.
--
View it on GitLab: https://gitlab.rtems.org/rtems/prequal/rtems-central/-/merge_requests/13
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20251007/a184719d/attachment.htm>
More information about the bugs
mailing list