Pass "-fno-sanitize=undefined" to a dependency?

One of my dependencies crashes due to UBSAN.

Can I pass “-fno-sanitize=undefined” to a transitive dependency? Or do I have to copy all the projects in the dependency chain and inject it into each one?

Thanks.

The dependency needs to expose an option. Most dependencies expose optimization mode. If you pass ReleaseFast as your optimization mode to that dependency, it will default to disabling UBSAN.

That’s typically a sufficient workaround. example

2 Likes

Thanks. That is indeed good enough for now.