Fix use-after-free in rendezvous queue #1919
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
./test-srt --gtest_filter=TestEnforcedEncryption.CASE_B_2_NonBlocking*
==24654==ERROR: AddressSanitizer: heap-use-after-free on address 0x62a000000f40 at pc 0x000109e6c756 bp 0x700000512550 sp 0x700000512548
READ of size 8 at 0x62a000000f40 thread T6
#0 0x109e6c755 in srt::sync::TimePointsrt::sync::steady_clock::TimePoint(srt::sync::TimePointsrt::sync::steady_clock const&) sync.h:189
#1 0x109df3f6c in srt::sync::TimePointsrt::sync::steady_clock::TimePoint(srt::sync::TimePointsrt::sync::steady_clock const&) sync.h:190
#2 0x10a1f0bfb in CRendezvousQueue::updateConnStatus(EReadStatus, EConnectStatus, CPacket const&) queue.cpp:949
#3 0x10a1fa38a in CRcvQueue::worker(void*) queue.cpp:1337
#4 0x7fff2032c94f in _pthread_start+0xdf (libsystem_pthread.dylib:x86_64+0x694f)
#5 0x7fff2032847a in thread_start+0xe (libsystem_pthread.dylib:x86_64+0x247a)