RTEMS | libdl/sparc: Fix overflow in relocation bitmask (!1219)

SHIVAM DEOLANKAR (@D3athSkulll) gitlab at rtems.org
Fri Apr 24 22:05:11 UTC 2026



SHIVAM DEOLANKAR created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1219

Project:Branches: D3athSkulll/rtems:libdl-sparc-overflow to rtems/rtos/rtems:main
Author:   SHIVAM DEOLANKAR



## Summary

\_BM(x) produces 64-bit values which are implicitly converted to int in reloc_target_bitmask. For x = 32, this causes truncation from 4294967295 to -1 on 32-bit targets, triggering -Woverflow. Used uint32_t and cast the result to avoid implicit narrowing.

Fixes #5557

## Generative AI

<!--If you have used AI please use the "AI Contribution" template otherwise leave this blank see our fulls statement at https://www.rtems.org/generative-ai/-->

<!--Default settings, if it is a dropdown it will set after submission-->

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1219
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/20260424/ff9ca102/attachment-0001.htm>


More information about the bugs mailing list