RTEMS | C++ std::mutex has no error checks (#5641)
Chris Johns (@chris)
gitlab at rtems.org
Mon Jul 13 02:09:38 UTC 2026
Chris Johns commented on a discussion: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5641#note_154341
This test code [lock.cpp](/-/project/26/uploads/f8441c178c662a5a45718bf92ec34b54/lock.cpp) failed on FreeBSD 15.1 built with the command line:
```
c++ -Wall -g -o lock -lpthread lock.cpp
```
```
locking test
main: m1 at0x8205c7470
main: lock: m1
t1: unlock: m at 0x8205c7470
Illegal instruction (core dumped)
```
Looking with `lldb` the start of the stack frame is:
```
(lldb) bt
* thread #2, name = 'lock', stop reason = signal SIGILL: privileged opcode
* frame #0: 0x0000000821d1e40f libc++.so.1`std::__1::mutex::unlock() + 15
frame #1: 0x0000000000203a7e lock`t1_body(m=0x000000082076f6e0) at lock.cpp:9:7
```
which means something in the C++ area of the compiler.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5641#note_154341
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/sent_notifications/4-598ptmdkeko4w96vx8ownbhwx-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260713/6b7a7073/attachment-0001.htm>
More information about the bugs
mailing list