Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASan changes ABI of shared libs #619

Open
ygribov opened this issue Nov 2, 2015 · 2 comments
Open

ASan changes ABI of shared libs #619

ygribov opened this issue Nov 2, 2015 · 2 comments

Comments

@ygribov
Copy link

ygribov commented Nov 2, 2015

ASan changes size of global variables by appending redzone size to it. This may cause runtime errors when/if other shared modules have been linked against non-sanitized version of the library.

Here is an example:

$ cat tmp.c
char xxx = 0;
$ clang tmp.c -shared -fPIC
$ readelf -sDW a.out  | grep xxx
    8   0: 0000000000201034     1 OBJECT  GLOBAL DEFAULT  21 xxx
$ clang tmp.c -shared -fPIC -fsanitize=address
$ readelf -sDW a.out  | grep xxx
   11   0: 00000000002010a0    64 OBJECT  GLOBAL DEFAULT  23 xxx

So perhaps we could come up with a less invasive way to fix sanitization of globals on Mac?

@ygribov
Copy link
Author

ygribov commented Nov 2, 2015

ASan changes size of global variables by appending redzone size to it.

Forgot to mention that this means ABI change.

@kcc
Copy link
Contributor

kcc commented Nov 2, 2015

None of us is working on it right now. Suggestions/patches are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants