huojianchaoyy opened a new pull request, #22279: URL: https://github.com/apache/nuttx/pull/22279
*Note: Please adhere to [Contributing Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).* ## Summary UBSAN changes from Xiaomi Vela, split out of #22206 as asked in its review. - **mm/ubsan: Supplementing missing interfaces for ubsan**: `__ubsan_handle_vla_bound_not_positive()` and `__ubsan_handle_nonnull_return_v1()`, which code built with `-fsanitize=vla-bound` or `-fsanitize=returns-nonnull-attribute` calls, and their empty versions for `CONFIG_MM_UBSAN_DUMMY`. - **mm/ubsan: never report recursively**: printing a report goes through `syslog()`; when that trips another check (seen early in boot on x86_64), the handler was re-entered until the stack overflowed. A nested report now returns without printing. ## Impact - New UBSAN handlers. A check that fails while a report is being printed is not reported. ## Testing Host: Ubuntu 22.04 x86_64, GCC 13.4.0, CMake 3.23 + Ninja 1.10. Base: master 25b649e1c08. `./tools/checkpatch.sh -c -u -m -g HEAD~2..HEAD` passes. `sim:ostest` (KASAN and UBSAN): a 320 s run completes one ostest pass with no KASAN/UBSAN report; apart from the delays printed by hrtimer_test, the output is the same as master's. Not tested: the x86_64 boot case, real hardware. -- 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]
