anchao commented on PR #17310: URL: https://github.com/apache/nuttx/pull/17310#issuecomment-3568876818
> What's the point of fighting for performance in debug code? It's normal for debug code to have no performance. Null pointer debug assertions are useful because they sometimes allow you to find bugs that are hard to find, like stack/buffers overflows. I remember that this type of assertions helped me to find bugs in completely unrelated parts of the kernel. I disagree with your point. In fact, most Nuttx devices have DEBUG_ASSERTIONS enabled by default, including those already on the market, because this is very helpful for locating and resolving certain issues. Therefore, performance is also very important in the enable assertion mode. > Also I very much doubt that all architectures support null pointer detection, the first thing that comes to my mind is STM32F0 (cortex-m0). For all STM32 0x0000:0000 is the correct address, which means that by default there will be no exception even for chips with MPU. This can lead to bugs that are difficult to detect and debug. @raiden00pl Have you actually seen the changes in #17300 reviewed? This commit removed the check for rtcb validity. If, as you claim, some hardware lacks 0-address protection, then #17300 needs to be reverted. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
