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

Valgrind Report for ext/interbase/tests/bug45575.phpt ('Bug #45575 (Segfault with invalid non-string as event handler callback)')

Script

1: <?php
2:
3:
require("interbase.inc");
4:
5:
$db ibase_connect($test_base);
6:
7: function 
foobar($var) { var_dump($var); return true; }
8:
9:
ibase_set_event_handler($dbnull'TEST1');
10:
ibase_set_event_handler($db1'TEST1');
11:
ibase_set_event_handler('foobar''TEST1');
12:
13:
?>
14:

Report

==8853== Invalid read of size 8
==8853==    at 0x7DF5D9: _php_ibase_event_block (ibase_events.c:106)
==8853==    by 0x7E10A1: zif_ibase_set_event_handler (ibase_events.c:354)
==8853==    by 0xEC16FC: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8853==    by 0xECD07E: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2585)
==8853==    by 0xEBF188: execute_ex (zend_vm_execute.h:363)
==8853==    by 0xEBFD2B: zend_execute (zend_vm_execute.h:388)
==8853==    by 0xE5516B: zend_execute_scripts (zend.c:1330)
==8853==    by 0xD7657A: php_execute_script (main.c:2549)
==8853==    by 0x10071DA: do_cli (php_cli.c:994)
==8853==    by 0x1008987: main (php_cli.c:1378)
==8853==  Address 0x1542e410 is 0 bytes after a block of size 32 alloc'd
==8853==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==8853==    by 0xDFFA8C: _emalloc (zend_alloc.c:2427)
==8853==    by 0x7E0C6C: zif_ibase_set_event_handler (ibase_events.c:343)
==8853==    by 0xEC16FC: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8853==    by 0xECD07E: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2585)
==8853==    by 0xEBF188: execute_ex (zend_vm_execute.h:363)
==8853==    by 0xEBFD2B: zend_execute (zend_vm_execute.h:388)
==8853==    by 0xE5516B: zend_execute_scripts (zend.c:1330)
==8853==    by 0xD7657A: php_execute_script (main.c:2549)
==8853==    by 0x10071DA: do_cli (php_cli.c:994)
==8853==    by 0x1008987: main (php_cli.c:1378)
==8853== 
==8853== Invalid read of size 8
==8853==    at 0x7DF62D: _php_ibase_event_block (ibase_events.c:106)
==8853==    by 0x7E10A1: zif_ibase_set_event_handler (ibase_events.c:354)
==8853==    by 0xEC16FC: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8853==    by 0xECD07E: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2585)
==8853==    by 0xEBF188: execute_ex (zend_vm_execute.h:363)
==8853==    by 0xEBFD2B: zend_execute (zend_vm_execute.h:388)
==8853==    by 0xE5516B: zend_execute_scripts (zend.c:1330)
==8853==    by 0xD7657A: php_execute_script (main.c:2549)
==8853==    by 0x10071DA: do_cli (php_cli.c:994)
==8853==    by 0x1008987: main (php_cli.c:1378)
==8853==  Address 0x1542e3e8 is 8 bytes before a block of size 32 alloc'd
==8853==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==8853==    by 0xDFFA8C: _emalloc (zend_alloc.c:2427)
==8853==    by 0x7E0C6C: zif_ibase_set_event_handler (ibase_events.c:343)
==8853==    by 0xEC16FC: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8853==    by 0xECD07E: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2585)
==8853==    by 0xEBF188: execute_ex (zend_vm_execute.h:363)
==8853==    by 0xEBFD2B: zend_execute (zend_vm_execute.h:388)
==8853==    by 0xE5516B: zend_execute_scripts (zend.c:1330)
==8853==    by 0xD7657A: php_execute_script (main.c:2549)
==8853==    by 0x10071DA: do_cli (php_cli.c:994)
==8853==    by 0x1008987: main (php_cli.c:1378)
==8853== 
==8853== Invalid read of size 8
==8853==    at 0x7DF63B: _php_ibase_event_block (ibase_events.c:106)
==8853==    by 0x7E10A1: zif_ibase_set_event_handler (ibase_events.c:354)
==8853==    by 0xEC16FC: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8853==    by 0xECD07E: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2585)
==8853==    by 0xEBF188: execute_ex (zend_vm_execute.h:363)
==8853==    by 0xEBFD2B: zend_execute (zend_vm_execute.h:388)
==8853==    by 0xE5516B: zend_execute_scripts (zend.c:1330)
==8853==    by 0xD7657A: php_execute_script (main.c:2549)
==8853==    by 0x10071DA: do_cli (php_cli.c:994)
==8853==    by 0x1008987: main (php_cli.c:1378)
==8853==  Address 0x1542e3e0 is 16 bytes before a block of size 32 alloc'd
==8853==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==8853==    by 0xDFFA8C: _emalloc (zend_alloc.c:2427)
==8853==    by 0x7E0C6C: zif_ibase_set_event_handler (ibase_events.c:343)
==8853==    by 0xEC16FC: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8853==    by 0xECD07E: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2585)
==8853==    by 0xEBF188: execute_ex (zend_vm_execute.h:363)
==8853==    by 0xEBFD2B: zend_execute (zend_vm_execute.h:388)
==8853==    by 0xE5516B: zend_execute_scripts (zend.c:1330)
==8853==    by 0xD7657A: php_execute_script (main.c:2549)
==8853==    by 0x10071DA: do_cli (php_cli.c:994)
==8853==    by 0x1008987: main (php_cli.c:1378)
==8853== 
==8853== Invalid read of size 8
==8853==    at 0x7DF649: _php_ibase_event_block (ibase_events.c:106)
==8853==    by 0x7E10A1: zif_ibase_set_event_handler (ibase_events.c:354)
==8853==    by 0xEC16FC: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8853==    by 0xECD07E: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2585)
==8853==    by 0xEBF188: execute_ex (zend_vm_execute.h:363)
==8853==    by 0xEBFD2B: zend_execute (zend_vm_execute.h:388)
==8853==    by 0xE5516B: zend_execute_scripts (zend.c:1330)
==8853==    by 0xD7657A: php_execute_script (main.c:2549)
==8853==    by 0x10071DA: do_cli (php_cli.c:994)
==8853==    by 0x1008987: main (php_cli.c:1378)
==8853==  Address 0x1542e3d8 is 24 bytes before a block of size 32 alloc'd
==8853==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==8853==    by 0xDFFA8C: _emalloc (zend_alloc.c:2427)
==8853==    by 0x7E0C6C: zif_ibase_set_event_handler (ibase_events.c:343)
==8853==    by 0xEC16FC: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8853==    by 0xECD07E: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2585)
==8853==    by 0xEBF188: execute_ex (zend_vm_execute.h:363)
==8853==    by 0xEBFD2B: zend_execute (zend_vm_execute.h:388)
==8853==    by 0xE5516B: zend_execute_scripts (zend.c:1330)
==8853==    by 0xD7657A: php_execute_script (main.c:2549)
==8853==    by 0x10071DA: do_cli (php_cli.c:994)
==8853==    by 0x1008987: main (php_cli.c:1378)
==8853== 
==8853== Invalid read of size 8
==8853==    at 0x7DF657: _php_ibase_event_block (ibase_events.c:106)
==8853==    by 0x7E10A1: zif_ibase_set_event_handler (ibase_events.c:354)
==8853==    by 0xEC16FC: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8853==    by 0xECD07E: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2585)
==8853==    by 0xEBF188: execute_ex (zend_vm_execute.h:363)
==8853==    by 0xEBFD2B: zend_execute (zend_vm_execute.h:388)
==8853==    by 0xE5516B: zend_execute_scripts (zend.c:1330)
==8853==    by 0xD7657A: php_execute_script (main.c:2549)
==8853==    by 0x10071DA: do_cli (php_cli.c:994)
==8853==    by 0x1008987: main (php_cli.c:1378)
==8853==  Address 0x1542e3d0 is not stack'd, malloc'd or (recently) free'd
==8853== 
==8853== Invalid read of size 8
==8853==    at 0x7DF665: _php_ibase_event_block (ibase_events.c:106)
==8853==    by 0x7E10A1: zif_ibase_set_event_handler (ibase_events.c:354)
==8853==    by 0xEC16FC: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8853==    by 0xECD07E: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2585)
==8853==    by 0xEBF188: execute_ex (zend_vm_execute.h:363)
==8853==    by 0xEBFD2B: zend_execute (zend_vm_execute.h:388)
==8853==    by 0xE5516B: zend_execute_scripts (zend.c:1330)
==8853==    by 0xD7657A: php_execute_script (main.c:2549)
==8853==    by 0x10071DA: do_cli (php_cli.c:994)
==8853==    by 0x1008987: main (php_cli.c:1378)
==8853==  Address 0x1542e3c8 is not stack'd, malloc'd or (recently) free'd
==8853== 
==8853== Invalid read of size 8
==8853==    at 0x7DF673: _php_ibase_event_block (ibase_events.c:106)
==8853==    by 0x7E10A1: zif_ibase_set_event_handler (ibase_events.c:354)
==8853==    by 0xEC16FC: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8853==    by 0xECD07E: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2585)
==8853==    by 0xEBF188: execute_ex (zend_vm_execute.h:363)
==8853==    by 0xEBFD2B: zend_execute (zend_vm_execute.h:388)
==8853==    by 0xE5516B: zend_execute_scripts (zend.c:1330)
==8853==    by 0xD7657A: php_execute_script (main.c:2549)
==8853==    by 0x10071DA: do_cli (php_cli.c:994)
==8853==    by 0x1008987: main (php_cli.c:1378)
==8853==  Address 0x1542e3c0 is not stack'd, malloc'd or (recently) free'd
==8853== 
==8853== Invalid read of size 8
==8853==    at 0x7DF681: _php_ibase_event_block (ibase_events.c:106)
==8853==    by 0x7E10A1: zif_ibase_set_event_handler (ibase_events.c:354)
==8853==    by 0xEC16FC: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8853==    by 0xECD07E: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2585)
==8853==    by 0xEBF188: execute_ex (zend_vm_execute.h:363)
==8853==    by 0xEBFD2B: zend_execute (zend_vm_execute.h:388)
==8853==    by 0xE5516B: zend_execute_scripts (zend.c:1330)
==8853==    by 0xD7657A: php_execute_script (main.c:2549)
==8853==    by 0x10071DA: do_cli (php_cli.c:994)
==8853==    by 0x1008987: main (php_cli.c:1378)
==8853==  Address 0x1542e3b8 is 16 bytes after a block of size 8 alloc'd
==8853==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==8853==    by 0xDFFA8C: _emalloc (zend_alloc.c:2427)
==8853==    by 0xDFFD86: _safe_emalloc (zend_alloc.c:2583)
==8853==    by 0x7E0C42: zif_ibase_set_event_handler (ibase_events.c:341)
==8853==    by 0xEC16FC: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8853==    by 0xECD07E: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2585)
==8853==    by 0xEBF188: execute_ex (zend_vm_execute.h:363)
==8853==    by 0xEBFD2B: zend_execute (zend_vm_execute.h:388)
==8853==    by 0xE5516B: zend_execute_scripts (zend.c:1330)
==8853==    by 0xD7657A: php_execute_script (main.c:2549)
==8853==    by 0x10071DA: do_cli (php_cli.c:994)
==8853==    by 0x1008987: main (php_cli.c:1378)
==8853== 
==8853== Invalid read of size 8
==8853==    at 0x7DF68F: _php_ibase_event_block (ibase_events.c:106)
==8853==    by 0x7E10A1: zif_ibase_set_event_handler (ibase_events.c:354)
==8853==    by 0xEC16FC: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8853==    by 0xECD07E: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2585)
==8853==    by 0xEBF188: execute_ex (zend_vm_execute.h:363)
==8853==    by 0xEBFD2B: zend_execute (zend_vm_execute.h:388)
==8853==    by 0xE5516B: zend_execute_scripts (zend.c:1330)
==8853==    by 0xD7657A: php_execute_script (main.c:2549)
==8853==    by 0x10071DA: do_cli (php_cli.c:994)
==8853==    by 0x1008987: main (php_cli.c:1378)
==8853==  Address 0x1542e3b0 is 8 bytes after a block of size 8 alloc'd
==8853==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==8853==    by 0xDFFA8C: _emalloc (zend_alloc.c:2427)
==8853==    by 0xDFFD86: _safe_emalloc (zend_alloc.c:2583)
==8853==    by 0x7E0C42: zif_ibase_set_event_handler (ibase_events.c:341)
==8853==    by 0xEC16FC: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8853==    by 0xECD07E: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2585)
==8853==    by 0xEBF188: execute_ex (zend_vm_execute.h:363)
==8853==    by 0xEBFD2B: zend_execute (zend_vm_execute.h:388)
==8853==    by 0xE5516B: zend_execute_scripts (zend.c:1330)
==8853==    by 0xD7657A: php_execute_script (main.c:2549)
==8853==    by 0x10071DA: do_cli (php_cli.c:994)
==8853==    by 0x1008987: main (php_cli.c:1378)
==8853== 
==8853== Invalid read of size 8
==8853==    at 0x7DF6A4: _php_ibase_event_block (ibase_events.c:106)
==8853==    by 0x7E10A1: zif_ibase_set_event_handler (ibase_events.c:354)
==8853==    by 0xEC16FC: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8853==    by 0xECD07E: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2585)
==8853==    by 0xEBF188: execute_ex (zend_vm_execute.h:363)
==8853==    by 0xEBFD2B: zend_execute (zend_vm_execute.h:388)
==8853==    by 0xE5516B: zend_execute_scripts (zend.c:1330)
==8853==    by 0xD7657A: php_execute_script (main.c:2549)
==8853==    by 0x10071DA: do_cli (php_cli.c:994)
==8853==    by 0x1008987: main (php_cli.c:1378)
==8853==  Address 0x1542e3a8 is 0 bytes after a block of size 8 alloc'd
==8853==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==8853==    by 0xDFFA8C: _emalloc (zend_alloc.c:2427)
==8853==    by 0xDFFD86: _safe_emalloc (zend_alloc.c:2583)
==8853==    by 0x7E0C42: zif_ibase_set_event_handler (ibase_events.c:341)
==8853==    by 0xEC16FC: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:558)
==8853==    by 0xECD07E: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2585)
==8853==    by 0xEBF188: execute_ex (zend_vm_execute.h:363)
==8853==    by 0xEBFD2B: zend_execute (zend_vm_execute.h:388)
==8853==    by 0xE5516B: zend_execute_scripts (zend.c:1330)
==8853==    by 0xD7657A: php_execute_script (main.c:2549)
==8853==    by 0x10071DA: do_cli (php_cli.c:994)
==8853==    by 0x1008987: main (php_cli.c:1378)
==8853== 

 

Generated at Wed, 16 Apr 2014 12:48:04 +0000 (23 hours ago)

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