O'Reilly logo

Hands-On System Programming with Linux by Kaiwan N Billimoria

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Running the test cases with ASan

To refresh our memory, here is the help screen from our membugs program:

$ ./membugs_dbg_asan Usage: ./membugs_dbg_asan option [ -h | --help] option =  1 : uninitialized var test case option =  2 : out-of-bounds : write overflow [on compile-time memory] option =  3 : out-of-bounds : write overflow [on dynamic memory] option =  4 : out-of-bounds : write underflow option =  5 : out-of-bounds : read overflow [on compile-time memory] option =  6 : out-of-bounds : read overflow [on dynamic memory] option =  7 : out-of-bounds : read underflow option =  8 : UAF (use-after-free) test case option =  9 : UAR (use-after-return) test case option = 10 : double-free test case option = 11 : memory leak test case 1: simple leak option ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required