Re: Re: Help - gcc mystery in ext/imap
On 01/20/2015 02:46 PM, Stanislav Malyshev wrote:
> Hi!
>
>> So, I guess the lesson is that we need to be careful when we migrate
>> extensions to PHP 7. Passing ints instead of size_t string length params
>> to zpp can cause extreme weirdness and we should go through all our
>> bundled extensions and make sure things that are still using "s" have
>> all been changed to size_t.
>
> Definitely so. I've recently went through intl and fixed a bunch of
> int/size_t issues, but judging from how many there were, I assume other
> non-trivial extensions would have such things too. We have lots of
> places where size_t and int are intermixed - e.g., random try, go to
> mysqli extension, do grep int *.c | grep len and see that results of
> spprintf - which returns size_t - are put into int. Now, in this case
> it's almost 100% not a problem, but illustrates bigger issue of mixing
> the types, and in some cases it may be a real problem.
Yeah, I was quite surprised by the weirdness it caused. I don't think I
have ever seen something that breaks under -O2 start working again
compiled with -O3. That's what had me chasing my tail into assembly
world for a bit there.
I have fixed up ext/imap now. Hopefully I caught them all.
-Rasmus
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Thread (7 messages)