### Prerequisite

• LLVM 3.4 with Clang and ASan support

### How to use Address Sanitizer (ASan)

• -fsanitize=address is to switch ASan on
• -fno-omit-frame-pointer is to get nicer stack traces in error messages

After you execute it, you'll see something as below:

You can see much information about the addresses used after free. But I couldn't find actually where are the addresses use-after-free+0x100000eb1 mapping to use-after-free.c. It's easy! Simply specify the ASan symbolizer:

Now you know where and how to fix it.