Skip to content
Tcl Source Code View Ticket
Login

View Ticket

-fsanitize=address not passed during linking of embtest

Closed / Fixedac874937c5b60d375d7468fac98420aae6c304d6Created 5 years agoUpdated 3 years ago
Descriptionwiki2022-04-16 18:38:30
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.

Referenced by4
  • 3d398944e8Revert 'fix' for [ac874937c5], committed as part of a "Merge 8.7" commit. It's wrong, since "embtest... check-in2024-06-27 09:11:39
  • 7a8b57a808Proposed fix for [ac874937c5]: -fsanitize=address not passed during linking of embtest check-in2023-06-30 07:56:06
  • 952fb0603cRevert 'fix' for [ac874937c5], committed as part of a "Merge 8.7" commit. It's wrong, since "embtest" is expected to be an executable, not a shared library check-in2023-06-30 07:40:19
  • 11dc381be8Open ticket [ab123cfd3d]: ValidateFormat(): signed integer overflow plus 5 other changes ticket2023-05-02 10:39:56
chrstphrchvzwiki2023-06-29 23:33:13

This is fixed as part of [f7688d05ca3d].

chrstphrchvz Closed ticket [ac874937c5]. [History diff]2023-06-29 23:33:23
jan.nijtmanswiki2023-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.nijtmanswiki2023-06-30 07:56:59

Does [this] work?

chrstphrchvzwiki2023-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.nijtmanswiki2023-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.

Log in (anonymous is fine) to add a comment.