> -----Original Message-----
> From: Johannes Schlüter [mailto:[email protected]]
> Sent: Monday, April 27, 2015 9:44 PM
> To: Hollenbeck, Scott
> Cc: [email protected]
> Subject: Re: [PECL-DEV] RE: SIGSEGV When Calling call_user_function()
> 
> Hi,
> 
> quick comment from scrolling over the code:
> 
> On Mon, 2015-04-27 at 17:19 +0000, Hollenbeck, Scott wrote:
> >     else {
> >         php_error_docref(NULL TSRMLS_DC, E_ERROR, "Invalid callback
> > parameters!");
> >            return;
> >     }
> 
> The php_error_docref call with E_ERROR will not return but bailout.
> Thus
> the PHP script can't handle the error. Also when this happens
> emalloc'ed
> memory will be force-freed and (while not relevant in this snippet)
> system resources might not be cleaned.
> 
> I'd suggest E_WARNING.
> 
> To learn how bailout works read about longjmp in your favorite C manual
> (`man longjmp` should work) and look at the
> zend_try/zend_first_try/zend_catch/zend_bailout implementation..

Thanks for the tip!

Scott

Reply via email to