RE: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_vm_def.h zend_vm_execute.h

From: Date: Wed, 06 Sep 2006 05:30:28 +0000
Subject: RE: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_vm_def.h zend_vm_execute.h
References: 1  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-5227@lists.php.net to get a copy of this message
Ilia, What are you doing? At least, you are making strlen() and strdup() from undefined value. I'll take care about #38579, and will commit better fix today. Dmitry. > -----Original Message----- > From: Ilia Alshanetsky [mailto:iliaa@php.net] > Sent: Tuesday, September 05, 2006 7:53 PM > To: zend-engine-cvs@lists.php.net > Subject: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_vm_def.h > zend_vm_execute.h > > > iliaa Tue Sep 5 15:52:42 2006 UTC > > Modified files: > /ZendEngine2 zend_vm_def.h zend_vm_execute.h > Log: > MFB: Fixed bug #38579 require_once/include_once > optimization causes files > to be loaded multiple times. > > > http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_def.h?r1=1.1 > 38&r2=1.139&diff_format=u > Index: ZendEngine2/zend_vm_def.h > diff -u ZendEngine2/zend_vm_def.h:1.138 > ZendEngine2/zend_vm_def.h:1.139 > --- ZendEngine2/zend_vm_def.h:1.138 Mon Sep 4 13:59:07 2006 > +++ ZendEngine2/zend_vm_def.h Tue Sep 5 15:52:42 2006 > @@ -18,7 +18,7 @@ > > +------------------------------------------------------------- > ---------+ > */ > > -/* $Id: zend_vm_def.h,v 1.138 2006/09/04 13:59:07 dmitry Exp $ */ > +/* $Id: zend_vm_def.h,v 1.139 2006/09/05 15:52:42 iliaa Exp $ */ > > /* If you change this file, please regenerate the > zend_vm_execute.h and > * zend_vm_opcodes.h files by running: > @@ -2833,20 +2833,23 @@ > zend_file_handle file_handle; > char cwd[MAXPATHLEN]; > cwd_state state; > - > +#ifndef PHP_WIN32 > if > (IS_ABSOLUTE_PATH(Z_STRVAL_P(inc_filename), > Z_STRLEN_P(inc_filename))) { > cwd[0] = '\0'; > } else if (!VCWD_GETCWD(cwd, > MAXPATHLEN)) { > cwd[0] = '\0'; > } > - > +#endif > state.cwd_length = strlen(cwd); > state.cwd = zend_strndup(cwd, > state.cwd_length); > > +#ifndef PHP_WIN32 > if (!virtual_file_ex(&state, > Z_STRVAL_P(inc_filename), NULL, 1) && > > zend_hash_exists(&EG(included_files), state.cwd, > state.cwd_length+1)) { > failure_retval=1; > - } else if (SUCCESS == > zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) { > + } else > +#endif > + if (SUCCESS == > zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) { > if (!file_handle.opened_path) { > > file_handle.opened_path = estrndup(Z_STRVAL_P(inc_filename), > Z_STRLEN_P(inc_filename)); > } > http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_execute.h?r1 > =1.142&r2=1.143&diff_format=u > Index: ZendEngine2/zend_vm_execute.h > diff -u ZendEngine2/zend_vm_execute.h:1.142 > ZendEngine2/zend_vm_execute.h:1.143 > --- ZendEngine2/zend_vm_execute.h:1.142 Mon Sep 4 13:59:07 2006 > +++ ZendEngine2/zend_vm_execute.h Tue Sep 5 15:52:42 2006 > @@ -1914,20 +1914,23 @@ > zend_file_handle file_handle; > char cwd[MAXPATHLEN]; > cwd_state state; > - > +#ifndef PHP_WIN32 > if > (IS_ABSOLUTE_PATH(Z_STRVAL_P(inc_filename), > Z_STRLEN_P(inc_filename))) { > cwd[0] = '\0'; > } else if (!VCWD_GETCWD(cwd, > MAXPATHLEN)) { > cwd[0] = '\0'; > } > - > +#endif > state.cwd_length = strlen(cwd); > state.cwd = zend_strndup(cwd, > state.cwd_length); > > +#ifndef PHP_WIN32 > if (!virtual_file_ex(&state, > Z_STRVAL_P(inc_filename), NULL, 1) && > > zend_hash_exists(&EG(included_files), state.cwd, > state.cwd_length+1)) { > failure_retval=1; > - } else if (SUCCESS == > zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) { > + } else > +#endif > + if (SUCCESS == > zend_stream_open(Z_STRVAL_P(inc_filename), > +&file_handle TSRMLS_CC)) { > if (!file_handle.opened_path) { > > file_handle.opened_path = estrndup(Z_STRVAL_P(inc_filename), > Z_STRLEN_P(inc_filename)); > } > @@ -4500,20 +4503,23 @@ > zend_file_handle file_handle; > char cwd[MAXPATHLEN]; > cwd_state state; > - > +#ifndef PHP_WIN32 > if > (IS_ABSOLUTE_PATH(Z_STRVAL_P(inc_filename), > Z_STRLEN_P(inc_filename))) { > cwd[0] = '\0'; > } else if (!VCWD_GETCWD(cwd, > MAXPATHLEN)) { > cwd[0] = '\0'; > } > - > +#endif > state.cwd_length = strlen(cwd); > state.cwd = zend_strndup(cwd, > state.cwd_length); > > +#ifndef PHP_WIN32 > if (!virtual_file_ex(&state, > Z_STRVAL_P(inc_filename), NULL, 1) && > > zend_hash_exists(&EG(included_files), state.cwd, > state.cwd_length+1)) { > failure_retval=1; > - } else if (SUCCESS == > zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) { > + } else > +#endif > + if (SUCCESS == > zend_stream_open(Z_STRVAL_P(inc_filename), > +&file_handle TSRMLS_CC)) { > if (!file_handle.opened_path) { > > file_handle.opened_path = estrndup(Z_STRVAL_P(inc_filename), > Z_STRLEN_P(inc_filename)); > } > @@ -7683,20 +7689,23 @@ > zend_file_handle file_handle; > char cwd[MAXPATHLEN]; > cwd_state state; > - > +#ifndef PHP_WIN32 > if > (IS_ABSOLUTE_PATH(Z_STRVAL_P(inc_filename), > Z_STRLEN_P(inc_filename))) { > cwd[0] = '\0'; > } else if (!VCWD_GETCWD(cwd, > MAXPATHLEN)) { > cwd[0] = '\0'; > } > - > +#endif > state.cwd_length = strlen(cwd); > state.cwd = zend_strndup(cwd, > state.cwd_length); > > +#ifndef PHP_WIN32 > if (!virtual_file_ex(&state, > Z_STRVAL_P(inc_filename), NULL, 1) && > > zend_hash_exists(&EG(included_files), state.cwd, > state.cwd_length+1)) { > failure_retval=1; > - } else if (SUCCESS == > zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) { > + } else > +#endif > + if (SUCCESS == > zend_stream_open(Z_STRVAL_P(inc_filename), > +&file_handle TSRMLS_CC)) { > if (!file_handle.opened_path) { > > file_handle.opened_path = estrndup(Z_STRVAL_P(inc_filename), > Z_STRLEN_P(inc_filename)); > } > @@ -20586,20 +20595,23 @@ > zend_file_handle file_handle; > char cwd[MAXPATHLEN]; > cwd_state state; > - > +#ifndef PHP_WIN32 > if > (IS_ABSOLUTE_PATH(Z_STRVAL_P(inc_filename), > Z_STRLEN_P(inc_filename))) { > cwd[0] = '\0'; > } else if (!VCWD_GETCWD(cwd, > MAXPATHLEN)) { > cwd[0] = '\0'; > } > - > +#endif > state.cwd_length = strlen(cwd); > state.cwd = zend_strndup(cwd, > state.cwd_length); > > +#ifndef PHP_WIN32 > if (!virtual_file_ex(&state, > Z_STRVAL_P(inc_filename), NULL, 1) && > > zend_hash_exists(&EG(included_files), state.cwd, > state.cwd_length+1)) { > failure_retval=1; > - } else if (SUCCESS == > zend_stream_open(Z_STRVAL_P(inc_filename), &file_handle TSRMLS_CC)) { > + } else > +#endif > + if (SUCCESS == > zend_stream_open(Z_STRVAL_P(inc_filename), > +&file_handle TSRMLS_CC)) { > if (!file_handle.opened_path) { > > file_handle.opened_path = estrndup(Z_STRVAL_P(inc_filename), > Z_STRLEN_P(inc_filename)); > } > > -- > Zend Engine CVS Mailing List (http://cvs.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.zend-engine.cvs (#5227) next »