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

Enable ASAN when using MIMalloc #3070

Closed
zhangh43 opened this issue May 22, 2024 · 2 comments
Closed

Enable ASAN when using MIMalloc #3070

zhangh43 opened this issue May 22, 2024 · 2 comments

Comments

@zhangh43
Copy link

I want to enable ASAN to do memory check for DragonflyDB, but DragonflyDB uses MiMalloc. Are they compatible? Two options:

  1. MiMalloc can be compiled with ASAN.
  2. Compile DragonflyDB with ASAN.

Did anyone try this before? Any ideas?

@kostasrim
Copy link
Contributor

Hello @zhangh43,

ASAN injects its own allocator and it also pads the region from the left and the right such that it finds overflows and underflows of memory.

Also in Dragonfly we use Fibers extensively and ASAN integration with fcontext is let's say incomplete which causes a few false positive that we have to manually turn off. There is a fully working integration with ucontext but the context switches are at least 50x slower so it's really not worth it to go over that route.

All in all, we do have sannitizers enabled and we do have a daily build that runs it and reports us the errors (and as I said I personally disabled the false positives)

I hope this is helpful :)

@kostasrim
Copy link
Contributor

Since there was no update on this for a few days, I am closing it. Let me know if something changes :)

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

No branches or pull requests

2 participants