| Ticket UUID: | ac874937c5b60d375d7468fac98420aae6c304d6 | ||
| Title: | -fsanitize=address not passed during linking of embtest | ||
| Type: | Bug | Created on: | 2022-04-16 18:38:30 |
| Submitter: | chrstphrchvz | Assigned to: | jan.nijtmans |
| Subsystem: | 53. Configuration and Build Tools | Severity: | Minor |
| Priority: | 5 Medium | Last modified: | 2023-07-03 08:10:09 |
| Status: | Closed | Closed by: | jan.nijtmans |
| Resolution: | Fixed | Closed on: | 2023-07-03 08:10:09 |
| Version: | trunk | ||
| Description: | ||||
|
If unix/configure is run with CFLAGS containing -fsanitize=address, then this flag also becomes necessary during separate linking steps (in order to link in the AddressSanitizer runtime). The embtest target in unix/dltest/Makefile.in does not accommodate this (even if LDFLAGS contains -fsanitize=address as it seemingly should). Since $(CC) is used as the linker for this target, I suspect CFLAGS/LDFLAGS should also be passed to it, but maybe there is a better way. | ||||
| User Comments: | ||||
chrstphrchvz added on 2023-06-29 23:33:13:
This is fixed as part of [f7688d05ca3d]. jan.nijtmans added on 2023-06-30 07:42:04:
I'm sorry, but this 'fix' is wrong: "embtest" is supposed to be an executable, not a shared library. jan.nijtmans added on 2023-06-30 07:56:59:
Does [7a8b57a808676da4|this] work? chrstphrchvz added on 2023-07-01 15:07:07:
[7a8b57a808] works. Although so does the CC_SWITCHES workaround as done in [cd8512b73b] and which I had been using for a while. jan.nijtmans added on 2023-07-03 08:10:09:
Thanks! So, I'll go for the fix in [cd8512b73b], which is already committed to trunk. If it turns out that LDFLAGS is needed as well on some platform (I don't expect so) it can always be handled later. | ||||
