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
smalys...@gmail.com

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to