How to generate core dump on AddressSanitizer error

↘锁芯ラ 提交于 2019-12-04 12:20:45

You need to set environment variable to request coredumps

export ASAN_OPTIONS=abort_on_error=1

This should really be default but due to historic reasons ASan just exits with non-zero error code instead.

On 64-bit systems you might need to add

export ASAN_OPTIONS=...:disable_coredump=0::unmap_shadow_on_exit=1

(coredumps are disabled by default there, in fear that they will be too large).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!