DynamoRIO / DynamoRIO/drmemory

possible leak in Concurrency::details::SchedulerBase::GetSubAllocator

Open
#1,875 2 comments 0 reactions 0 assignees View on GitHub
Bug-FalsePositive Component-LeakCheck Component-Tests good first issue help wanted
Dominant language
C
Stars
2.7k
Forks
290
PR merge metrics
No merged PRs in 30d

Description

Running the 64-bit Concurrency.Scheduler test on win7:

```
Error #5: POSSIBLE LEAK 1568 direct bytes 0x0000000002572480-0x0000000002572aa0 + 64 indirect bytes
#0 replace_operator_new (0x00000000bfac8ef0 )
d:\derek\drmemory\git\src\common\alloc_replace.c:2899
#1 Concurrency::details::SchedulerBase::GetSubAllocator (0x000000013f7dfb5c )
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\schedulerbase.cpp:2488
#2 Concurrency::Alloc (0x000000013f7e1ef7 )
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\suballocator.cpp:34
#3 Concurrency::details::ExternalContextBase::Alloc (0x000000013f7ffa7d )
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\externalcontextbase.cpp:191
#4 Concurrency::details::_AllocBase::operator new (0x000000013f744353 )
c:\program files (x86)\microsoft visual studio 10.0\vc\include\concrt.h:184
#5 Concurrency::details::ContextBase::CreateWorkQueue (0x000000013f7f7e90 )
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\contextbase.cpp:467
#6 Concurrency::details::_UnrealizedChore::_InternalAlloc<> (0x000000013f7442cc )
c:\program files (x86)\microsoft visual studio 10.0\vc\include\concrt.h:3484
#7 Concurrency::details::_TaskCollection::_TaskCollection (0x000000013f7dc54c )
f:\dd\vctools\crt_bld\self_64_amd64\crt\src\taskcollection.cpp:545
#8 Concurrency::task_group::run_and_wait<> (0x000000013f744248 )
c:\program files (x86)\microsoft visual studio 10.0\vc\include\ppl.h:636
#9 perform_task (0x000000013f742a78 )
d:\derek\drmemory\git\src\tests\app_suite\concurrency_win.cpp:97
#10 current_scheduler (0x000000013f7429c6 )
d:\derek\drmemory\git\src\tests\app_suite\concurrency_win.cpp:118
#11 std::_Vector_const_iterator<>::_Vector_const_iterator<> (0x000000013f7c6c1f )
c:\program files (x86)\microsoft visual studio 10.0\vc\include\vector:46
```

Glancing at the SchedulerBase.cpp I don't see any shenanigans where the returned pointer from new is not used directly and is offset, so it's not clear what's going on. Needs analysis.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.