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.

Reply via email to