christophercrouzet / rexo

Neat single-file cross-platform unit testing framework for C/C++.
The Unlicense
27 stars 6 forks source link

Make a "asan for custom data sections" as on/off parameter #18

Closed default-writer closed 1 year ago

default-writer commented 1 year ago

I got a lot of warning of a parameter which is not really matters, so a propose to do make it optional for a client code and use it by default in rexo.h so your code not changed, and my code will not suffer by utilizing paramter value 0, i.e.:

#ifndef _GLOBALS_H_
#define _GLOBALS_H_

#define RXP_SANITIZE_ADDRESS 0 // just disable all no_sanitize_address warnings

#endif // _GLOBALS_H_

One loom share a thousands words:

https://www.loom.com/share/ab03f01d29c84bdf839cef8d17674ff4

christophercrouzet commented 1 year ago

Hi @default-writer, thanks for pointing out this issue and proposing a patch!

The no_sanitize_address attribute was mostly introduced to workaround a bug in older versions of Clang, so I've opened !19 with changes around add this attribute only when the compiler is Clang.

Please give it a try and let me know if that works for you!

default-writer commented 1 year ago

@christophercrouzet anyway, you found some time, and your solutions are awesome, as always, if anyway, someone will ever wanted to revert your commits, or mine, i'am not against that, i will appreciate any of the solutions, cause we are better than corporations, we are community :) thank you!