develooper Front page | perl.perl5.porters | Postings from April 2014

Re: [perl #121711] [PATCH] Coverity: perlio.c: accessing out-of-scopestack variable

Thread Previous | Thread Next
From:
Leon Timmermans
Date:
April 30, 2014 20:30
Subject:
Re: [perl #121711] [PATCH] Coverity: perlio.c: accessing out-of-scopestack variable
Message ID:
CAHhgV8gPM+mfOJqfN7h4BE3Uzqqc9FFzVSYeHWWOdZQUZHa8Eg@mail.gmail.com
On Wed, Apr 30, 2014 at 3:45 AM, bulk88 via RT <perlbug-followup@perl.org>wrote:

> This patch needed a clearer explanation. It took me a long time to figure
> out what this patch is fixing. It should have mentioned that
> PerlIOStdio_mode returns tmode, and "mode" was assigned a * to an out of
> scope C auto.
>

It's just a simple fix for a simple but easy to read over issue in a piece
of code that's not particularly commonly used. Commit-message could be
better, but discussing what it should look like isn't really worth the
effort IMHO.


> Ideally tmode should be renamed to "buf", or PerlIOStdio_mode should
> return void and the caller knows what * it passed. PerlIOStdio_mode's API
> falls into the stupid category with localtime() and strerror().
>

Ideally, PerlIOStdio would DIAF.

Leon

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About