Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Fixing a uname bug (Apache NuttX RTOS) (lupyuen.org)
32 points by lupyuen 5 months ago | hide | past | favorite | 10 comments



I had recently run into an embedded problem where when switching the order of two functions in the source code, one of them would refuse to work. I tried a number of things without identifying the real error, and finally had to add a comment warning any later parties not to do this. I even checked the assembly and they seem to be consistent. But when I upload to firmware, the error keeps coming back over and over again.


This is a fascinating article with a good detective story, and juicy details, but the images are very distracting.

They auto-scale to the correct aspect ratio to fill most of the width of the screen. On a mobile phone, sure, that's fine. On a widescreen monitor on a desktop computer, they are monstrously huge and don't fit on the screen.

In the CSS, rustdoc.css has img{max-width: 100%;}, but it also has .content,nav{max-width: 960px;} which is what's contraining the width of the article's text. The images look a lot better on widescreen with img{max-width: 960px;} to match... but then they don't scale correctly on the mobile layout.


Thanks for the tip! I fixed the CSS, it should look better on desktop now :-)


Looks good, thanks!


Bugs like these are fun to read about, but never fun to debug if you need to get something else done. Nice writeup by Lup Yuen Lee once again.


Thank you so much! :-)


There are a number of edge cases in embedded where static variables can become unreliable. I am not saying it is common exactly but it is certainly not unheard of. I usually keep it in my list of things to check when stuff is mysteriously going wrong


I like his work on the pinephone


... what was the bug?


The loader was fixing up the ELF's .data section incorrectly:

https://github.com/apache/nuttx/issues/15526

https://github.com/apache/nuttx/pull/15527




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: