mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-24 22:13:52 +01:00
19270: drivers/at24cxxx: implement _mtd_at24cxxx_read_page r=benpicco a=HendrikVE ### Contribution description The function `read_page` was missing which lead to (from a user perspective) undefined behavior on the MTD layer. ### Testing procedure Any application using MTD in conjunction with a board with an at24cxxx. 19271: core/xfa: disable asan on llvm r=benpicco a=Teufelchen1 ### Contribution description Hi! 🦎 When using llvm and address sanitation, the XFA trip the sanitizer. This PR attempts to fix this by adding the `no_sanitize` attribute to the XFA macros. Sadly, this attribute is not known by gnu, a guard is hence needed. I'm open for alternatives as I dislike this solution but it is the best I could come up with. ### Testing procedure Before this patch: Go to `examples/gnrc_minimal` and run `TOOLCHAIN=llvm make all-asan` and then `make term`. You should see an error similar to this: ``` ==3374719==ERROR: AddressSanitizer: global-buffer-overflow on address 0x080774e0 at pc 0x0804af5e bp 0x0808eb88 sp 0x0808eb78 READ of size 4 at 0x080774e0 thread T0 #0 0x804af5d in _auto_init_module /RIOT/sys/auto_init/auto_init.c:40 #1 0x804af5d in auto_init /RIOT/sys/auto_init/auto_init.c:339 #2 0x804b375 in main_trampoline /RIOT/core/lib/init.c:56 #3 0xf76bc7b8 in makecontext (/lib32/libc.so.6+0x4a7b8) ... ``` After applying this PR, the example can be build and run with llvm or gcc, with or without asan. Co-authored-by: Hendrik van Essen <hendrik.vanessen@ml-pa.com> Co-authored-by: Teufelchen1 <bennet.blischke@haw-hamburg.de>