Closed ckornher closed 3 years ago
@ckornher Hi, AddressSanitizer can show stack buffer overflow warning because it can't detect the change of stack location (google/sanitizers#189). If possible, could you please provide real crash reports?
Also please pay attention to this issue which has already been discussed - https://github.com/belozierov/SwiftCoroutine/issues/22
@belozierov Thanks for the reply. It looks like it was probably a race condition in my code. I am going to close the one.
I have been experiencing random crashes some of which seem to involve random memory corruption. I have since found a probable cause, but did run across this while I was searching for issues.
I ran address sanitizer on my code and it spit out the following. There is a warning of potential false positives...
==47182==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x70000f1bb000; bottom 0x00010a1da000; size: 0x6fff04fe1000 (123141091102720) False positive error reports may follow For details see https://github.com/google/sanitizers/issues/189
==47182==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x00010a1db9e1 at pc 0x000100136a7a bp 0x70000f1b9bb0 sp 0x70000f1b9370 READ of size 5664 at 0x00010a1db9e1 thread T2
0 0x100136a79 in wrap_memmove+0x169 (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x1da79)
0x00010a1db9e1 is located 190945 bytes inside of 200704-byte region [0x00010a1ad000,0x00010a1de000) allocated by thread T2 here:
0 0x100162870 in wrap_posix_memalign+0xb0 (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x49870)
Thread T2 created by T1 here: