Bug 377717 - Fix massive space leak when reading compressed debuginfo sections
Summary: Fix massive space leak when reading compressed debuginfo sections
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.13 SVN
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks: 303877
  Show dependency treegraph
 
Reported: 2017-03-17 09:35 UTC by Julian Seward
Modified: 2017-03-20 21:34 UTC (History)
0 users

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


Attachments
Fix (11.46 KB, patch)
2017-03-17 09:42 UTC, Julian Seward
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Seward 2017-03-17 09:35:21 UTC
Support for compressed debuginfo sections was added in bug 303877.  Although
this works, it uses huge amounts of space, for example more than 15GB memory
for reading from a 580MB libxul.so created with "gcc7 -Og -gz".  Given that
the equivalent non-"-gz" size of the file is about 1.4GB this seems quite
unreasonable.

Furthermore, examination of the bug 303877 fix shows that the changes to
get_slowcase() introduces a tricky invariant which is not documented, which
makes the code hard to understand and hard to reason about.
Comment 1 Julian Seward 2017-03-17 09:42:15 UTC
Created attachment 104607 [details]
Fix

A fix.  Largely rewrites get_slowcase, documents abovementioned invariant,
and adds a bunch of sanity checking for CEnts.
Comment 2 Julian Seward 2017-03-20 21:34:41 UTC
Fixed, r16279.