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

==13087== Conditional jump or move depends on uninitialised value(s)
==13087==    at 0xFAC645: zend_send_by_var_helper_SPEC_VAR (zend_vm_execute.h:13415)
==13087==    by 0xFADC50: ZEND_SEND_VAR_SPEC_VAR_HANDLER (zend_vm_execute.h:13531)
==13087==    by 0xF6050C: execute_ex (zend_vm_execute.h:363)
==13087==    by 0xF610AF: zend_execute (zend_vm_execute.h:388)
==13087==    by 0xEF4BFA: zend_execute_scripts (zend.c:1341)
==13087==    by 0xE111E1: php_execute_script (main.c:2613)
==13087==    by 0x10AF62E: do_cli (php_cli.c:998)
==13087==    by 0x10B0E27: main (php_cli.c:1382)
==13087== 
==13087== Conditional jump or move depends on uninitialised value(s)
==13087==    at 0xEF83AC: zend_parse_arg_impl (zend_API.c:443)
==13087==    by 0xEF9AF0: zend_parse_arg (zend_API.c:691)
==13087==    by 0xEFA73C: zend_parse_va_args (zend_API.c:873)
==13087==    by 0xEFAC19: zend_parse_parameters (zend_API.c:924)
==13087==    by 0xF160F0: zif_strlen (zend_builtin_functions.c:486)
==13087==    by 0xF62A86: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==13087==    by 0xF6E61C: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2602)
==13087==    by 0xF6050C: execute_ex (zend_vm_execute.h:363)
==13087==    by 0xF610AF: zend_execute (zend_vm_execute.h:388)
==13087==    by 0xEF4BFA: zend_execute_scripts (zend.c:1341)
==13087==    by 0xE111E1: php_execute_script (main.c:2613)
==13087==    by 0x10AF62E: do_cli (php_cli.c:998)
==13087== 

 

Generated at Wed, 04 Jan 2017 07:31:11 +0000 (17 days ago)

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