com php-src: Minor cosmetics for our test functions in the debug build: Zend/zend_builtin_functions.c

From: Date: Thu, 26 Mar 2015 01:03:55 +0000
Subject: com php-src: Minor cosmetics for our test functions in the debug build: Zend/zend_builtin_functions.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-85887@lists.php.net to get a copy of this message
Commit: 10e1b13ac5497c109e7ded8fd3f8fbcc42c6a283 Author: Kalle Sommer Nielsen <kalle@php.net> Thu, 26 Mar 2015 02:03:55 +0100 Parents: 1c5994184f9505f1b157eb075926565739781bde Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=10e1b13ac5497c109e7ded8fd3f8fbcc42c6a283 Log: Minor cosmetics for our test functions in the debug build Changed paths: M Zend/zend_builtin_functions.c Diff: diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index b378f93..b123cda 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1555,7 +1555,7 @@ ZEND_FUNCTION(class_alias) Cause an intentional memory leak, for testing/debugging purposes */ ZEND_FUNCTION(leak) { - zend_long leakbytes=3; + zend_long leakbytes = 3; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &leakbytes) == FAILURE) { return; @@ -1565,7 +1565,8 @@ ZEND_FUNCTION(leak) } /* }}} */ -/* {{{ proto leak_variable(mixed variable [, bool leak_data]) */ +/* {{{ proto void leak_variable(mixed variable [, bool leak_data]) + Leak a variable that is a resource or an object */ ZEND_FUNCTION(leak_variable) { zval *zv; @@ -1589,12 +1590,19 @@ ZEND_FUNCTION(leak_variable) #ifdef ZEND_TEST_EXCEPTIONS +/* {{{ proto void crash(void) + Crash the script */ ZEND_FUNCTION(crash) { - char *nowhere=NULL; + char *nowhere = NULL; + + if (zend_parse_parameters_none() == FAILURE) { + return; + } memcpy(nowhere, "something", sizeof("something")); } +/* }}} */ #endif #endif /* ZEND_DEBUG */

« previous php.cvs (#85887) next »