Central | spec/rtems: fix clobbered local in task restart validation (!13)
Sebastian Huber (@sebhub)
gitlab at rtems.org
Mon Oct 13 07:48:07 UTC 2025
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_134885
> if ( ctx->interrupt || ctx->nested_request ) {
> if ( ctx->blocked ) {
> SetFatalHandler( ResumeThreadDispatch, ctx );
> - cpu_self = _Thread_Dispatch_disable();
> + (void) _Thread_Dispatch_disable();
>
> if ( setjmp( ctx->thread_dispatch_context ) == 0 ) {
I reviewed the complete function. From my point of view this warning is a false positive. From searching the internet, it seems the `-Wclobbered` warning is prone to produce false positives. The `ctx` is also a non-volatile local variable. It is just a matter of time before it produces a warning as well. I need more time to review this. Some suggest to move the setjmp() call to a separate function without local variables.
--
View it on GitLab: https://gitlab.rtems.org/rtems/prequal/rtems-central/-/merge_requests/13#note_134885
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/20251013/b21f3d23/attachment.htm>
More information about the bugs
mailing list