==30==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000000054 at pc 0x00000040d6e7 bp 0x7fffd87fd2f0 sp 0x7fffd87fd2e8
READ of
越界访问了,注意数组等的边界,len-1

=================================================================
==30==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x603000000054 at pc 0x00000040d6e7 bp 0x7fffd87fd2f0 sp 0x7fffd87fd2e8
READ of size 4 at 0x603000000054 thread T0
#1 0x7f96f8e952e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0)
0x603000000054 is located 0 bytes to the right of 20-byte region [0x603000000040,0x603000000054)
allocated by thread T0 here:
#0 0x7f96fa8bace0 in operator new(unsigned long) (/usr/local/lib64/libasan.so.5+

本文讨论了在Android开发中遇到的越界访问问题,导致的ERROR: AddressSanitizer: heap-buffer-overflow。强调了检查数组边界的重要性,并介绍了如何使用Sanitizer工具来定位和解决这类Bug。

3956

被折叠的 条评论
为什么被折叠?



