Project

General

Profile

Feature #3962

osmo-trx: Use gcc attribute no_sanitize to run fine with ASan enabled

Added by pespin about 2 months ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
04/28/2019
Due date:
% Done:

0%

Spec Reference:

Description

So far we don't enable ASan during osmo-trx build because it adds too much overhead and makes it wrong incorrectly (too slow).

zecke informed that there's a gcc compile-time attribute to flag specific functions to be not covered by ASan. So we can run perf on osmo-trx, see the most CPU intensive functions and disable ASan on those.

https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes

History

#1 Updated by pespin about 2 months ago

Since we usually compile with "-fsanitize=address -fsanitize=undefined" in osmocom projects, we should probably use flags:
"no_sanitize_address no_sanitize_undefined"

I need to check what happens if compiled with a compiler which doesn't support those flags. Do we need to put it into some OSMO_SANITIZE_AVOID define which is set to empty based on compiler support?

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)