PHP  
 PHP_5_6
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Valgrind Report for ext/zip/tests/oo_properties.phpt ('ziparchive::properties isset()/empty() checks')

Script

1: <?php
2:
3: $dirname 
dirname(__FILE__) . '/';
4:
$file $dirname '__property_test.zip';
5:
6:
copy($dirname 'test_with_comment.zip'$file);
7:
8:
$zip = new ZipArchive;
9: if (!
$zip->open($file)) {
10:     exit(
'failed');
11: }
12:
13:
printf("zip->status (%d):\n\tempty(): %d\n\tisset(): %d\n"$zip->status, empty($zip->status), isset($zip->status));
14:
printf("zip->numFiles (%d):\n\tempty(): %d\n\tisset(): %d\n"$zip->numFiles, empty($zip->numFiles), isset($zip->numFiles));
15:
printf("zip->bogus (%d):\n\tempty(): %d\n\tisset(): %d\n"$zip->bogus, empty($zip->bogus), isset($zip->bogus));
16:
17:
18:
$zip->addEmptyDir('emptydir');
19:
20:
printf("zip->status (%d):\n\tempty(): %d\n\tisset(): %d\n"$zip->status, empty($zip->status), isset($zip->status));
21:
printf("zip->numFiles (%d):\n\tempty(): %d\n\tisset(): %d\n"$zip->numFiles, empty($zip->numFiles), isset($zip->numFiles));
22:
printf("zip->filename (%d):\n\tempty(): %d\n\tisset(): %d\n"strlen($zip->filename), empty($zip->filename), isset($zip->filename));
23:
printf("zip->comment (%d):\n\tempty(): %d\n\tisset(): %d\n"strlen($zip->comment), empty($zip->comment), isset($zip->comment));
24:
25: unset(
$zip); //close the file before unlinking
26:
@unlink($file);
27:
?>
28:

Report

==20841== Conditional jump or move depends on uninitialised value(s)
==20841==    at 0xF75F47: zend_send_by_var_helper_SPEC_VAR (zend_vm_execute.h:13385)
==20841==    by 0xF77552: ZEND_SEND_VAR_SPEC_VAR_HANDLER (zend_vm_execute.h:13501)
==20841==    by 0xF2A1EE: execute_ex (zend_vm_execute.h:363)
==20841==    by 0xF2AD91: zend_execute (zend_vm_execute.h:388)
==20841==    by 0xEBFB2F: zend_execute_scripts (zend.c:1341)
==20841==    by 0xDDDA5B: php_execute_script (main.c:2597)
==20841==    by 0x107746E: do_cli (php_cli.c:994)
==20841==    by 0x1078C1B: main (php_cli.c:1378)
==20841== 
==20841== Conditional jump or move depends on uninitialised value(s)
==20841==    at 0xEC32E4: zend_parse_arg_impl (zend_API.c:443)
==20841==    by 0xEC4A28: zend_parse_arg (zend_API.c:691)
==20841==    by 0xEC5674: zend_parse_va_args (zend_API.c:873)
==20841==    by 0xEC5B51: zend_parse_parameters (zend_API.c:924)
==20841==    by 0xEE09AC: zif_strlen (zend_builtin_functions.c:486)
==20841==    by 0xF2C768: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==20841==    by 0xF382FE: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2602)
==20841==    by 0xF2A1EE: execute_ex (zend_vm_execute.h:363)
==20841==    by 0xF2AD91: zend_execute (zend_vm_execute.h:388)
==20841==    by 0xEBFB2F: zend_execute_scripts (zend.c:1341)
==20841==    by 0xDDDA5B: php_execute_script (main.c:2597)
==20841==    by 0x107746E: do_cli (php_cli.c:994)
==20841== 

 

Generated at Wed, 29 Jul 2015 05:45:12 +0000 (3 hours ago)

Copyright © 2005-2015 The PHP Group
All rights reserved.