SkASAN.h and SK_SANITIZE_ADDRESS lead to ABI mismatch

6 views
Skip to first unread message

Alexandre Bique

unread,
Nov 18, 2025, 4:09:09 AM (2 days ago) Nov 18
to skia-discuss
Hi,

Here's the buggy scenario:
1. compile skia without asan and export the static library
2. build an app with asan and link to skia

It will lead to crash because, SK_SANITIZE_ADDRESS is calculated at compile time and leads to different sizeof() in at least one object, see SkTarray:

#ifdef SK_SANITIZE_ADDRESS
bool fPoisoned = false;
#endif

This seems wrong to me, and I suggest that the poison tracking condition is computed at configure time and stored into some kind of SkConfig.h.

At least please find a solution which avoids ABI mismatch when using a statically compiled version of Skia.

Thank you very much.

Cheers,
Alex
Reply all
Reply to author
Forward
0 new messages