Re: Re: Help - gcc mystery in ext/imap
| From: | Stanislav Malyshev | Date: | Tue, 20 Jan 2015 22:46:19 +0000 |
| Subject: | Re: Re: Help - gcc mystery in ext/imap | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-80915@lists.php.net to get a copy of this message | ||
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.
--
Stas Malyshev
smalyshev@gmail.com