Closed nalajcie closed 1 year ago
please note that currently sanitizers will be enabled on host utils - it can be easily changed (set NOSAN := 1
in Makefile), I think it's healthy to have them enabled for some time to maybe discover new errors
LGTM
I think that sanitizers should be enabled for developing host utils/test builds but not for hostutils releases (which we should do and use in normal builds)
I've added explicit info in the hostutils Makefile:
I think right now I'll keep compiling sanitizer-enabled tools by default in phoenix-rtos-project (if many developers would use them we might find more errors) but will build with NOSAN=1
while preparing docker images ("releases" used in CI).
Hehh, turns out building with NOSAN=1
didn't work due to magically changed order of linkage.
Introduced LOCAL_LDLIBS
in binary.mk
to circumvent that.
Heeh, first time I see that sanitizers covers some problems instead of exposing it.
Yeah, I think -fsanitize
while linking by gcc
is translated to linking against libasan.so
(which needs to be the very first dynamic lib - so it results in dynamic linking order rearrangement).
So LOCAL_LDLIBS is designed to be used only in hostutils build (as in other cases we have everything in our _build root.
for anything in host-generic-pc as only there we're using dynamic linking / external host libraries (eg. adding -lm
in tests could/should be done by LOCAL_LDLIBS
)
Approving, but please do changes in phoenix-rtos-build before merge.
Yep, I'm waiting for test PR to pass before merging anything.
CI to pass: https://github.com/phoenix-rtos/phoenix-rtos-project/pull/815
Description
please note that currently sanitizers will be enabled on host utils - it can be easily changed (set
NOSAN := 1
in Makefile), I think it's healthy to have them enabled for some time to maybe discover new errorsMotivation and Context
Types of changes
How Has This Been Tested?
Checklist:
Special treatment