This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, libgfortran] PR 40330 Fix use of saved format strings


On Wed, Jun 3, 2009 at 22:18, Janne Blomqvist <blomqvist.janne@gmail.com> wrote:
> On Wed, Jun 3, 2009 at 22:00, Janne Blomqvist <blomqvist.janne@gmail.com> wrote:
>> Hi,
>>
>> the attached patch fixes PR 40330. The problem was that for the saved
>> format strings we were just keeping pointer to the strings that reside
>> in the st_parameter_dt structure. However, this lives on the stack so
>> once it goes out of scope the cached entries became invalid. Fixed by
>> using heap storage.
>>
>> Regtested on x86_64-unknown-linux-gnu, Ok for trunk and 4.4?
>
> Upon some further though, realloc() is not appropriate here.
> Simplified patch attached.
>
> Regtested on x86_64-unknown-linux-gnu, Ok for trunk and 4.4?
>
>
> --
> Janne Blomqvist
>

Committed to trunk, reviewed and OK'd on IRC by Tobias B.

Sending        libgfortran/ChangeLog
Sending        libgfortran/io/format.c
Transmitting file data ..
Committed revision 148149.

I'll wait a few days before committing to 4.4.

-- 
Janne Blomqvist


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]