develooper Front page | perl.perl5.porters | Postings from August 2017

Re: Shouldn't we be fixing our function interfaces to removeinappropriate I32 U32?

Thread Previous | Thread Next
From:
John P. Linderman
Date:
August 12, 2017 14:25
Subject:
Re: Shouldn't we be fixing our function interfaces to removeinappropriate I32 U32?
Message ID:
CAC0cEp9R5+U-gNu9eJ3_CniBwuVtyVyf=QSaHsRtYOkbntA7hQ@mail.gmail.com
Father Chrysostomos wrote:
> Date: 11 Aug 2017 01:02:11 -0000
> Subject: Re: Shouldn't we be fixing our function interfaces to remove
inappropriate I32 U32?
> Karl Williamson wrote:
> > I'm thinking we should go through embed.fnc looking for these parameter
> > types that are specifying lengths, and change them, even if these are in
> > the public API.  Aren't these are segfaults and DOS attacks waiting to
> > happen?
> >
> > Zefram said we did something similar a while back with array indices.
> >
> > I'm unsure of the implications for modules that can work on earlier
perls.
>
> The main problem to watch out for is I32 pointers.  I32* parameters
cannot be changed without really breaking things.

> Also, be aware that not every use of I32 is bad.

I  certainly found the I32 typedef confusing in pp_sort.c. It rather shouts
"32-bits" when it is nothing of the (ahem) sort. I'll leave it alone in
what I'm doing, but it certainly can mislead.

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