Bug 359133 - m_deduppoolalloc.c:258 (vgPlain_allocEltDedupPA): Assertion 'eltSzB <= ddpa->poolSzB' failed.
Summary: m_deduppoolalloc.c:258 (vgPlain_allocEltDedupPA): Assertion 'eltSzB <= ddpa->...
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.12 SVN
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-08 13:18 UTC by David Hallas
Modified: 2016-02-20 16:55 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Reduced test case (5.57 KB, text/x-c++src)
2016-02-16 15:27 UTC, David Hallas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Hallas 2016-02-08 13:18:09 UTC
Valgrind will crash with an assertion error:

m_deduppoolalloc.c:258 (vgPlain_allocEltDedupPA): Assertion 'eltSzB <= ddpa->poolSzB' failed.

when encountering a debug info string larger than 64kb. This can quite easily be reproduced when using heavily templated C++ code.
Comment 1 Philippe Waroquiers 2016-02-14 22:15:41 UTC
Fixed in revision 15787.

Note: the fix was tested by temporarily changing the pool size to a very small value.
It would be nice if you could produce a small test case which has a string > 64 Kb, so
as to have a regression test for this.
Comment 2 David Hallas 2016-02-15 07:27:41 UTC
Hi Philippe,

I tested with the latest HEAD and it works! Thanks a lot for fixing this issue, it is greatly appreciated.
Should I go ahead and close the bug or what is the workflow?
Comment 3 Ivo Raisr 2016-02-15 07:43:26 UTC
David, please provide a small test case as Philippe suggested.
That would be highly appreciated!
Comment 4 David Hallas 2016-02-15 07:46:54 UTC
I can try :) What would the format of a testcase be? Would a C++ code snippet be good enough?
Comment 5 Philippe Waroquiers 2016-02-15 20:28:52 UTC
(In reply to David Hallas from comment #4)
> I can try :) What would the format of a testcase be? Would a C++ code
> snippet be good enough?
A small compilable testcase c++ is ok.
Bonus points if the testcase consists in a single file.
Thanks
Comment 6 David Hallas 2016-02-16 15:27:51 UTC
Created attachment 97251 [details]
Reduced test case
Comment 7 David Hallas 2016-02-16 15:29:05 UTC
I have attached a reduced test case that shows the problem. I have tested with gcc-4.9.3 and clang-3.7.1 using a 64bit Linux PC. I compiled it like this:

g++ -std=c++11 main.cpp -o test

I also verified that the latest master fixes the problem.

Let me know if there is anything else you need
Comment 8 Philippe Waroquiers 2016-02-18 21:33:24 UTC
(In reply to David Hallas from comment #7)
> I have attached a reduced test case that shows the problem. I have tested
> with gcc-4.9.3 and clang-3.7.1 using a 64bit Linux PC. I compiled it like
> this:
> 
> g++ -std=c++11 main.cpp -o test
> 
> I also verified that the latest master fixes the problem.
> 
> Let me know if there is anything else you need

Thanks for the test case.
Test added in revision 15799
Comment 9 David Hallas 2016-02-19 07:08:20 UTC
So, should I go ahead and close the bug now that a testcase has been added?
Comment 10 Philippe Waroquiers 2016-02-20 16:55:22 UTC
(In reply to David Hallas from comment #9)
> So, should I go ahead and close the bug now that a testcase has been added?

Status was changed to RESOLVED/FIXED which seems to be the final status of
valgrind bugs.