pw_tokenizer: Apply no_sanitize("address") to tokenizer string entries
ASAN applies a 32-byte alignment to global variables as part of its
redzone strategy. This breaks the requirement that the
_pw_tokenizer_string_entry_* variables are 1-byte aligned so they appear
consecutively in the ELF section without any padding.
This isn't normally an issue as ASAN isn't used on firmware builds where
tokenization is used. But in the case of self-detokenizing programs
(namely tests), this causes ASAN violations and corrupt token entry ELF
section data.
Applying __attribute__((no_sanitize("address"))) to these variables
bypasses this behavior.
See also: https://pwrev.dev/c/pigweed/pigweed/+/328273/comments/7ee80b04_6fde2fa2
Bug: 448430357
Change-Id: I1008a9331a38b0a1325d8317ca1de4a2c45895f4
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/328692
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Docs-Not-Needed: Jonathon Reinhart <jrreinhart@google.com>
Tests-Not-Needed: Jonathon Reinhart <jrreinhart@google.com>
Commit-Queue: Jonathon Reinhart <jrreinhart@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/.