```error
=================================================================
==1481379==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60300000026f at pc 0x5641d23df4d6 bp 0x7ffd14a1a050 sp 0x7ffd14a1a040
READ of size 1 at 0x60300000026f thread T0
#0 0x5641d23df4d5 in operator+(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (/home/hzoi/jdw/duel/ddd+0x194d5)
#1 0x5641d23d8268 in main (/home/hzoi/jdw/duel/ddd+0x12268)
#2 0x7fa9146fb082 in __libc_start_main ../csu/libc-start.c:308
#3 0x5641d23d8a3d in _start (/home/hzoi/jdw/duel/ddd+0x12a3d)
0x60300000026f is located 0 bytes to the right of 31-byte region [0x603000000250,0x60300000026f)
allocated by thread T0 here:
#0 0x7fa915691587 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cc:104
#1 0x7fa9154e387f in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned long) (/lib/x86_64-linux-gnu/libstdc++.so.6+0x14387f)
#2 0x31313131313130 (<unknown module>)
SUMMARY: AddressSanitizer: heap-buffer-overflow (/home/hzoi/jdw/duel/ddd+0x194d5) in operator+(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
Shadow bytes around the buggy address:
0x0c067fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c067fff8000: fa fa 00 00 00 07 fa fa fd fd fd fd fa fa fd fd
0x0c067fff8010: fd fd fa fa fd fd fd fd fa fa fd fd fd fd fa fa
0x0c067fff8020: fd fd fd fd fa fa fd fd fd fd fa fa fd fd fd fd
0x0c067fff8030: fa fa fd fd fd fd fa fa fd fd fd fd fa fa fd fd
=>0x0c067fff8040: fd fd fa fa fd fd fd fd fa fa 00 00 00[07]fa fa
0x0c067fff8050: fd fd fd fd fa fa fd fd fd fd fa fa fd fd fd fd
0x0c067fff8060: fa fa fd fd fd fd fa fa fd fd fd fd fa fa fd fd
0x0c067fff8070: fd fd fa fa fd fd fd fd fa fa fd fd fd fd fa fa
0x0c067fff8080: fd fd fd fd fa fa fd fd fd fd fa fa fd fd fd fd
0x0c067fff8090: fa fa fd fd fd fd fa fa fd fd fd fd fa fa fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==1481379==ABORTING
Command exited with non-zero status 1
```
by STA_Morlin @ 2024-02-01 14:55:43
@[STA_Morlin](/user/347089) 看不懂一点。
by gghack_Nythix @ 2024-02-01 14:59:29
@[STA_Morlin](/user/347089) 而且每次输出都不一样。
by gghack_Nythix @ 2024-02-01 14:59:44