PHP 4.0 Bug #3012 Updated: highlight_string dumps core when run standalone

From: Date: Mon, 20 Dec 1999 23:13:28 +0000
Subject: PHP 4.0 Bug #3012 Updated: highlight_string dumps core when run standalone
Groups: php.dev 
Request: Send a blank email to php-dev+get-13887@lists.php.net to get a copy of this message
ID: 3012 Updated by: evan Reported By: stas@zend.com Status: Analyzed Bug Type: Reproduceable crash Assigned To: Comments: Not sure if this is the correct fix, but it does eliminate the core dump. Index: zend-scanner.l =================================================================== RCS file: /repository/Zend/zend-scanner.l,v retrieving revision 1.67 diff -u -r1.67 zend-scanner.l zend_highlight(syntax_highlighter_ini); Á+++ zend-scanner.l 1999/12/20 23:12:49 @@ -576,18 +576,14 @@ int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ini) { zend_lex_state original_lex_state; - zval tmp = *str; CLS_FETCH(); - str = &tmp; - zval_copy_ctor(str); save_lexical_state(&original_lex_state CLS_CC); if (prepare_string_for_scanning(str CLS_CC)==FAILURE) { return FAILURE; } zend_highlight(syntax_highlighter_ini); restore_lexical_state(&original_lex_state CLS_CC); - zval_dtor(str); return SUCCESS; } END_EXTERN_C() Full Bug description available at: http://bugs.php.net/version4/?id=3012

« previous php.dev (#13887) next »