Probably spurrious ==30720==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7fff13613910 at pc 0x562270a0fd0a bp 0x7fff13613850 sp 0x7fff13613840

Description

==30720==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7fff13613910 at pc 0x562270a0fd0a bp 0x7fff13613850 sp 0x7fff13613840
WRITE of size 40 at 0x7fff13613910 thread T0
#0 0x562270a0fd09 in Stroika::Foundation:ebug::AssertExternallySynchronizedLock::lock_shared_() const /home/lewis/Sandbox/Stroika-Dev/Library/Sources/Stroika/Foundation/Debug/AssertExternallySynchronizedLock.cpp:57
#1 0x5622706fa3a5 in Stroika::Foundation:ebug::AssertExternallySynchronizedLock::lock_shared() const ../Characters/../Containers/../Traversal/../Debug/AssertExternallySynchronizedLock.inl:94
#2 0x5622706fe4d7 in std::shared_lock<Stroika::Foundation:ebug::AssertExternallySynchronizedLock const>::shared_lock(Stroika::Foundation:ebug::AssertExternallySynchronizedLock const&) /usr/include/c++/8/shared_mutex:553
#3 0x56227073bc84 in Stroika::Foundation::Traversal::Iterable<double>::_SafeReadRepAccessor<Stroika::Foundation::Traversal::Iterable<double>::_IRep>::_SafeReadRepAccessor(Stroika::Foundation::Traversal::Iterable<double> const*) (/home/lewis/Sandbox/Stroika-Dev/Builds/g+-8-debug-c+2a/Test45+0x153cc84)
#4 0x562270727506 in Stroika::Foundation::Traversal::Iterable<double>::GetLength() const (/home/lewis/Sandbox/Stroika-Dev/Builds/g+-8-debug-c+2a/Test45+0x1528506)
#5 0x5622707126dd in Stroika::Foundation::Traversal::Iterable<double>::size() const (/home/lewis/Sandbox/Stroika-Dev/Builds/g+-8-debug-c+2a/Test45+0x15136dd)
#6 0x562270703c0b in Stroika::Foundation::Traversal::Iterable<double>::Nth(unsigned long) const (/home/lewis/Sandbox/Stroika-Dev/Builds/g+-8-debug-c+2a/Test45+0x1504c0b)
#7 0x5622706f2476 in Test9_Optimization_DownhillSimplexMinimization_ /home/lewis/Sandbox/Stroika-Dev/Tests/45/Test.cpp:336
#8 0x5622706f28ea in DoRegressionTests_ /home/lewis/Sandbox/Stroika-Dev/Tests/45/Test.cpp:353
#9 0x5622708b8ef6 in Stroika::TestHarness:rintPassOrFail(void ()) /home/lewis/Sandbox/Stroika-Dev/Tests/45/../TestHarness/TestHarness.cpp:75
#10 0x5622706f2930 in main /home/lewis/Sandbox/Stroika-Dev/Tests/45/Test.cpp:360
#11 0x7fd8c213eb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
#12 0x5622706ea489 in _start (/home/lewis/Sandbox/Stroika-Dev/Builds/g+-8-debug-c+2a/Test45+0x14eb489)

Address 0x7fff13613910 is located in stack of thread T0 at offset 160 in frame
#0 0x562270a0f9cf in Stroika::Foundation:ebug::AssertExternallySynchronizedLock::lock_shared_() const /home/lewis/Sandbox/Stroika-Dev/Library/Sources/Stroika/Foundation/Debug/AssertExternallySynchronizedLock.cpp:48

This frame has 3 object(s):
[32, 40) 'sharedLockProtect'
[96, 104) '<unknown>'
[160, 200) '<unknown>' <== Memory access at offset 160 is inside this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
(longjmp and C++ exceptions are supported)
SUMMARY: AddressSanitizer: stack-use-after-scope /home/lewis/Sandbox/Stroika-Dev/Library/Sources/Stroika/Foundation/Debug/AssertExternallySynchronizedLock.cpp:57 in Stroika::Foundation:ebug::AssertExternallySynchronizedLock::lock_shared_() const
Shadow bytes around the buggy address:
0x1000626ba6d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1000626ba6e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1000626ba6f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1000626ba700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1
0x1000626ba710: f1 f1 00 f2 f2 f2 f2 f2 f2 f2 00 f2 f2 f2 f2 f2
=>0x1000626ba720: f2 f2[f8]f8 00 00 00 f2 f2 f2 00 00 00 00 00 00
0x1000626ba730: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1000626ba740: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1
0x1000626ba750: f1 f1 00 00 00 00 f3 f3 f3 f3 00 00 00 00 00 00
0x1000626ba760: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x1000626ba770: 00 00 00 00 f1 f1 f1 f1 00 00 00 f2 f2 f2 f2 f2
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
==30720==ABORTING
[] (0 seconds) [45] Foundation::Math (../Builds/g+-8-debug-c+2a/Test45)

Status

Assignee

Lewis Pringle

Reporter

Lewis Pringle

Labels

None

Priority

Lowest
Configure