Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASSERT alloc.c:1635: !TEST(MALLOC_VALID, old_e->flags) (internal error in malloc tracking) #310

Closed
derekbruening opened this issue Nov 28, 2014 · 3 comments

Comments

@derekbruening
Copy link
Contributor

From bruen...@google.com on February 24, 2011 22:01:52

win7 base_unittests:
% ~/drmemory/git/build_drmemory/bin/drmemory.exe -batch -pause_at_assert -dr c:/src/dr/git/exports -- ./base_unittests.exe --gtest_filter="-FileVersion*:ProcessUtilTest.GetAppOutput:ReadOnlyFileUtilTest.ContentsEqual:ReadOnlyFileUtilTest.TextContentsEqual:DataPackTest.Load"

...
[ RUN ] LoggingTest.CheckStreamsAreLazy
[206420:206700:0216/195136:364413624:FATAL:logging_unittest.cc(175)] Check failed: !mock_log_source.Log(). check message: The operation completed successfully.
Backtrace:
base::debug::StackTrace::StackTrace [0x005E1171+33]
logging::LogMessage::~LogMessage [0x005231FF+63]
logging::Win32ErrorLogMessage::~Win32ErrorLogMessage [0x00523C0E+558]
logging::`anonymous namespace'::LoggingTest_CheckStreamsAreLazy_Test::TestBody 0x00337210+496
testing::Message::operator<<<char const [63]> [0x004F0D87+167]
testing::Test::Run [0x004DE49E+174]
testing::TestInfo::Run [0x004DEC73+227]
testing::TestCase::Run [0x004DF36F+239]
testing::internal::UnitTestImpl::RunAllTests [0x004E45F0+640]
testing::internal::ForEach<std::vector<testing::TestEventListener *,std::allocator<testing::TestEventListener > >,void (__cdecl)(testing::TestEventListener *)> [0x004F1187+135]
testing::UnitTest::Run [0x004E320C+172]
base:: TestSuite ::Run 0x0051C621+177
main 0x0040426D+45
__tmainCRTStartup 0x00608A77+279
mainCRTStartup 0x0060894F+15
BaseThreadInitThunk [0x75903677+14]
__RtlUserThreadStart [0x77D59F02+112]
_RtlUserThreadStart [0x77D59ED5+27]

:::Dr.Memory::: ASSERT FAILURE (thread 206700): ..\src\common\alloc.c:1635: !TEST(MALLOC_VALID, old_e->flags) (internal error in malloc tracking)

Original issue: http://code.google.com/p/drmemory/issues/detail?id=310

@derekbruening
Copy link
Contributor Author

From bruen...@google.com on February 25, 2011 10:17:23

xref issue #47 the problem here is tailcalls mixing w/ multiple layers:

msvcrt!operator delete+0x6:
76b8b0bf e9d0e7ffff jmp msvcrt!free (76b89894)

dbghelp!operator delete[]+0x6:
6fa5341a e9caedfeff jmp dbghelp!operator delete (6fa421e9)
dbghelp!operator delete:
6fa421e9 ff250410a46f jmp dword ptr [dbghelp!imp??3YAXPAXZ (6fa41004)]
0:001> dd 6fa41004 L1
6fa41004 76b8b0b9
0:001> U 76b8b0b9
msvcrt!operator delete:

need tailcalls to store the layer at which they should apply.

the real worry here is the potential nested tailcall w/ delete[]=>delete
and delete=>free: assert should fire if we actually hit such a case.
and it does fire.
=> storing tailcall info in a fixed-size stack and handling nested
tailcalls. just not handling self-recursive tailcalls.

@derekbruening
Copy link
Contributor Author

From derek.br...@gmail.com on February 25, 2011 11:48:59

This issue was closed by revision r194 .

Status: Fixed

@derekbruening
Copy link
Contributor Author

From timurrrr@google.com on February 28, 2011 01:08:56

Issue 47 has been merged into this issue.

Cc: timur...@google.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant