Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

AddressSanitizerAndDebugger

Evgeniy Stepanov edited this pageAug 26, 2016 ·7 revisions

gdb

You can usegdb withbinaries built byAddressSanitizer in a usual way.WhenAddressSanitizer finds a bug it calls one of the functions__asan_report_{load,store}{1,2,4,8,16} which in turn calls__asan::ReportGenericError.If you want gdb to stop before asan reports an error, set a breakpoint on__asan::ReportGenericError.If you want gdb to stop after asan has reported an error, set a breakpoint on __sanitizer::Die or useASAN_OPTIONS=abort_on_error=1.

Inside gdb you can ask asan to describe a memory location:

(gdb) set overload-resolution off(gdb) p __asan_describe_address(0x7ffff73c3f80)0x7ffff73c3f80 is located 0 bytes inside of 10-byte region [0x7ffff73c3f80,0x7ffff73c3f8a)freed by thread T0 here: ...

Clone this wiki locally


[8]ページ先頭

©2009-2026 Movatter.jp