r/cpp • u/Havunenreddit • Apr 24 '26
Hunting a Windows ARM crash through Rust, C, and a Build-System configurations
https://autoexplore.medium.com/hunting-a-windows-arm-crash-through-rust-c-and-a-build-system-configurations-f768dd66d5c5This week I experienced really interesting bug hunt where Windows ARM target platform started failing CI while other environments passed successfully.
I learnt how to:
- Use C - programs from Rust programs
- Compiler configurations are as important as source code
- What is STATUS_ACCESS_VIOLATION
Hope you like it :)
10
Upvotes
6
u/meltbox Apr 24 '26
I am so lost. What moron would ever use compare and exchange as a load? Where is this in the mimalloc source?
I am having trouble believing this is real and I’m struggling to understand why they’d only do this for C implementation but use an atomic load with std::atomic.
Something just isn’t adding up for me.
4
u/ReDucTor Game Developer | quiz.cpp-perf.com Apr 24 '26
I am surprised CAS didnt hit a similar issue on x86, atleast with my observations of cache line invalidation for CAS occurs when the write would not occur, which causes some badly written spin lock style approaches to perform particularly bad.
2
u/germandiago Apr 26 '26
If my post about Rust CVEs related to C++ safety was removed this week.
Why this post is not removed? I have already a collection of double standards (for example when posting something and they send me to Show&Tell but others are not).
It would be nice to have objective criterias. I would not like to think this is biased towards who and not what.
Thanks!
0
u/[deleted] Apr 24 '26
[removed] — view removed comment