This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/53510] [4.8 Regression] OOM while compile some code
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 29 May 2012 07:53:37 +0000
- Subject: [Bug middle-end/53510] [4.8 Regression] OOM while compile some code
- Auto-submitted: auto-generated
- References: <bug-53510-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53510
--- Comment #7 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> 2012-05-29 07:53:37 UTC ---
(In reply to comment #6)
> Created attachment 27515 [details]
> gcc48-pr53510.patch
>
> Ugh, that leaks like crazy. Not only it forgets to free buffers, but also
> doubles the size of the allocation (which is fine) but only adds 2 to the
> expected allocated block length, so it allocates twice as much for every 2
> bytes beyond 200 characters on a line.
You are right. It is very weird what that code is doing. FWIW, I copied the
function from gcov.c:read_line, so I guess that code has the same bug.