develooper Front page | perl.perl5.porters | Postings from June 2015

Re: Coverity finding: shift by negative

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
June 24, 2015 12:35
Subject:
Re: Coverity finding: shift by negative
Message ID:
CAJueppuJr5CkJmMpvMPeuxxvf9tjB1vKxR=GhoLHkh7XFKZuJA@mail.gmail.com
I realized that I one of my replies to Abigail was accidentally private:

> > > How big is big enough to warn?  Either 32, because your program would be
> > > affected if run on a 32-bit perl (even though you aren't) or maxbits, because
> > >  it is affected in this runtime.
> >
> > It's not (just) the question of ancient Perls.
> >
> > Some platforms still are natively 32-bit.  Some of them are not
> > necessarily that current but I *think* (may be wrong...) for example
> > Solaris cc still defaults to 32-bit long (maybe on older Sparc only)
> > and therefore also IV is 32-bit.  Ditto for HPUX.
>
> Sure. But I'm fairly certain that the overwhelming majority of the
> code *I* write is never going to run a perl that doesn't deal with
> 64 bit integers; even on the boxes I own that use 32 bit hardware,
> the perls I'm using are old enough to accept the 64bit integer
> compilation flag.
>
> This makes the warning utterly useless and very annoying (to me).

Also, another example of us leaking the wordsize is ~.

On Tue, Jun 23, 2015 at 9:21 AM, Abigail <abigail@abigail.be> wrote:
> On Tue, Jun 23, 2015 at 08:55:05AM -0400, Ricardo Signes wrote:
>>
>> How big is big enough to warn?  Either 32, because your program would be
>> affected if run on a 32-bit perl (even though you aren't) or maxbits, because
>> it is affected in this runtime.
>
>
> I'd really hate it if a program starts warning for something that
> has a theoretical chance of happening, when you know very well in
> reality it will never.
>
> Warn me if I actually run with a 32-bit perl, not because I may want
> to drag out and compile 5.004 (or whatever version it was that wasn't
> able to deal with 64 bit integers) and run my program on.
>
>
> Abigail



-- 
There is this special biologist word we use for 'stable'. It is
'dead'. -- Jack Cohen

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