PHP  
 PHP_5_5
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

==24461== Invalid read of size 8
==24461==    at 0x7D4CDD: _php_ibase_event_block (ibase_events.c:108)
==24461==    by 0x7D67A5: zif_ibase_set_event_handler (ibase_events.c:356)
==24461==    by 0xEA71B1: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:550)
==24461==    by 0xEB1222: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2329)
==24461==    by 0xEA4E00: execute_ex (zend_vm_execute.h:363)
==24461==    by 0xEA5992: zend_execute (zend_vm_execute.h:388)
==24461==    by 0xE41F61: zend_execute_scripts (zend.c:1316)
==24461==    by 0xD656FC: php_execute_script (main.c:2506)
==24461==    by 0x1026445: do_cli (php_cli.c:994)
==24461==    by 0x1027BF2: main (php_cli.c:1378)
==24461==  Address 0x1541ba70 is 0 bytes after a block of size 32 alloc'd
==24461==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==24461==    by 0xDED9A4: _emalloc (zend_alloc.c:2427)
==24461==    by 0x7D6370: zif_ibase_set_event_handler (ibase_events.c:345)
==24461==    by 0xEA71B1: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:550)
==24461==    by 0xEB1222: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2329)
==24461==    by 0xEA4E00: execute_ex (zend_vm_execute.h:363)
==24461==    by 0xEA5992: zend_execute (zend_vm_execute.h:388)
==24461==    by 0xE41F61: zend_execute_scripts (zend.c:1316)
==24461==    by 0xD656FC: php_execute_script (main.c:2506)
==24461==    by 0x1026445: do_cli (php_cli.c:994)
==24461==    by 0x1027BF2: main (php_cli.c:1378)
==24461== 
==24461== Invalid read of size 8
==24461==    at 0x7D4D31: _php_ibase_event_block (ibase_events.c:108)
==24461==    by 0x7D67A5: zif_ibase_set_event_handler (ibase_events.c:356)
==24461==    by 0xEA71B1: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:550)
==24461==    by 0xEB1222: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2329)
==24461==    by 0xEA4E00: execute_ex (zend_vm_execute.h:363)
==24461==    by 0xEA5992: zend_execute (zend_vm_execute.h:388)
==24461==    by 0xE41F61: zend_execute_scripts (zend.c:1316)
==24461==    by 0xD656FC: php_execute_script (main.c:2506)
==24461==    by 0x1026445: do_cli (php_cli.c:994)
==24461==    by 0x1027BF2: main (php_cli.c:1378)
==24461==  Address 0x1541ba48 is 8 bytes before a block of size 32 alloc'd
==24461==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==24461==    by 0xDED9A4: _emalloc (zend_alloc.c:2427)
==24461==    by 0x7D6370: zif_ibase_set_event_handler (ibase_events.c:345)
==24461==    by 0xEA71B1: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:550)
==24461==    by 0xEB1222: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2329)
==24461==    by 0xEA4E00: execute_ex (zend_vm_execute.h:363)
==24461==    by 0xEA5992: zend_execute (zend_vm_execute.h:388)
==24461==    by 0xE41F61: zend_execute_scripts (zend.c:1316)
==24461==    by 0xD656FC: php_execute_script (main.c:2506)
==24461==    by 0x1026445: do_cli (php_cli.c:994)
==24461==    by 0x1027BF2: main (php_cli.c:1378)
==24461== 
==24461== Invalid read of size 8
==24461==    at 0x7D4D3F: _php_ibase_event_block (ibase_events.c:108)
==24461==    by 0x7D67A5: zif_ibase_set_event_handler (ibase_events.c:356)
==24461==    by 0xEA71B1: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:550)
==24461==    by 0xEB1222: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2329)
==24461==    by 0xEA4E00: execute_ex (zend_vm_execute.h:363)
==24461==    by 0xEA5992: zend_execute (zend_vm_execute.h:388)
==24461==    by 0xE41F61: zend_execute_scripts (zend.c:1316)
==24461==    by 0xD656FC: php_execute_script (main.c:2506)
==24461==    by 0x1026445: do_cli (php_cli.c:994)
==24461==    by 0x1027BF2: main (php_cli.c:1378)
==24461==  Address 0x1541ba40 is 16 bytes before a block of size 32 alloc'd
==24461==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==24461==    by 0xDED9A4: _emalloc (zend_alloc.c:2427)
==24461==    by 0x7D6370: zif_ibase_set_event_handler (ibase_events.c:345)
==24461==    by 0xEA71B1: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:550)
==24461==    by 0xEB1222: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2329)
==24461==    by 0xEA4E00: execute_ex (zend_vm_execute.h:363)
==24461==    by 0xEA5992: zend_execute (zend_vm_execute.h:388)
==24461==    by 0xE41F61: zend_execute_scripts (zend.c:1316)
==24461==    by 0xD656FC: php_execute_script (main.c:2506)
==24461==    by 0x1026445: do_cli (php_cli.c:994)
==24461==    by 0x1027BF2: main (php_cli.c:1378)
==24461== 
==24461== Invalid read of size 8
==24461==    at 0x7D4D4D: _php_ibase_event_block (ibase_events.c:108)
==24461==    by 0x7D67A5: zif_ibase_set_event_handler (ibase_events.c:356)
==24461==    by 0xEA71B1: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:550)
==24461==    by 0xEB1222: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2329)
==24461==    by 0xEA4E00: execute_ex (zend_vm_execute.h:363)
==24461==    by 0xEA5992: zend_execute (zend_vm_execute.h:388)
==24461==    by 0xE41F61: zend_execute_scripts (zend.c:1316)
==24461==    by 0xD656FC: php_execute_script (main.c:2506)
==24461==    by 0x1026445: do_cli (php_cli.c:994)
==24461==    by 0x1027BF2: main (php_cli.c:1378)
==24461==  Address 0x1541ba38 is 24 bytes before a block of size 32 alloc'd
==24461==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==24461==    by 0xDED9A4: _emalloc (zend_alloc.c:2427)
==24461==    by 0x7D6370: zif_ibase_set_event_handler (ibase_events.c:345)
==24461==    by 0xEA71B1: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:550)
==24461==    by 0xEB1222: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2329)
==24461==    by 0xEA4E00: execute_ex (zend_vm_execute.h:363)
==24461==    by 0xEA5992: zend_execute (zend_vm_execute.h:388)
==24461==    by 0xE41F61: zend_execute_scripts (zend.c:1316)
==24461==    by 0xD656FC: php_execute_script (main.c:2506)
==24461==    by 0x1026445: do_cli (php_cli.c:994)
==24461==    by 0x1027BF2: main (php_cli.c:1378)
==24461== 
==24461== Invalid read of size 8
==24461==    at 0x7D4D5B: _php_ibase_event_block (ibase_events.c:108)
==24461==    by 0x7D67A5: zif_ibase_set_event_handler (ibase_events.c:356)
==24461==    by 0xEA71B1: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:550)
==24461==    by 0xEB1222: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2329)
==24461==    by 0xEA4E00: execute_ex (zend_vm_execute.h:363)
==24461==    by 0xEA5992: zend_execute (zend_vm_execute.h:388)
==24461==    by 0xE41F61: zend_execute_scripts (zend.c:1316)
==24461==    by 0xD656FC: php_execute_script (main.c:2506)
==24461==    by 0x1026445: do_cli (php_cli.c:994)
==24461==    by 0x1027BF2: main (php_cli.c:1378)
==24461==  Address 0x1541ba30 is not stack'd, malloc'd or (recently) free'd
==24461== 
==24461== Invalid read of size 8
==24461==    at 0x7D4D69: _php_ibase_event_block (ibase_events.c:108)
==24461==    by 0x7D67A5: zif_ibase_set_event_handler (ibase_events.c:356)
==24461==    by 0xEA71B1: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:550)
==24461==    by 0xEB1222: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2329)
==24461==    by 0xEA4E00: execute_ex (zend_vm_execute.h:363)
==24461==    by 0xEA5992: zend_execute (zend_vm_execute.h:388)
==24461==    by 0xE41F61: zend_execute_scripts (zend.c:1316)
==24461==    by 0xD656FC: php_execute_script (main.c:2506)
==24461==    by 0x1026445: do_cli (php_cli.c:994)
==24461==    by 0x1027BF2: main (php_cli.c:1378)
==24461==  Address 0x1541ba28 is not stack'd, malloc'd or (recently) free'd
==24461== 
==24461== Invalid read of size 8
==24461==    at 0x7D4D77: _php_ibase_event_block (ibase_events.c:108)
==24461==    by 0x7D67A5: zif_ibase_set_event_handler (ibase_events.c:356)
==24461==    by 0xEA71B1: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:550)
==24461==    by 0xEB1222: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2329)
==24461==    by 0xEA4E00: execute_ex (zend_vm_execute.h:363)
==24461==    by 0xEA5992: zend_execute (zend_vm_execute.h:388)
==24461==    by 0xE41F61: zend_execute_scripts (zend.c:1316)
==24461==    by 0xD656FC: php_execute_script (main.c:2506)
==24461==    by 0x1026445: do_cli (php_cli.c:994)
==24461==    by 0x1027BF2: main (php_cli.c:1378)
==24461==  Address 0x1541ba20 is not stack'd, malloc'd or (recently) free'd
==24461== 
==24461== Invalid read of size 8
==24461==    at 0x7D4D85: _php_ibase_event_block (ibase_events.c:108)
==24461==    by 0x7D67A5: zif_ibase_set_event_handler (ibase_events.c:356)
==24461==    by 0xEA71B1: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:550)
==24461==    by 0xEB1222: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2329)
==24461==    by 0xEA4E00: execute_ex (zend_vm_execute.h:363)
==24461==    by 0xEA5992: zend_execute (zend_vm_execute.h:388)
==24461==    by 0xE41F61: zend_execute_scripts (zend.c:1316)
==24461==    by 0xD656FC: php_execute_script (main.c:2506)
==24461==    by 0x1026445: do_cli (php_cli.c:994)
==24461==    by 0x1027BF2: main (php_cli.c:1378)
==24461==  Address 0x1541ba18 is 16 bytes after a block of size 8 alloc'd
==24461==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==24461==    by 0xDED9A4: _emalloc (zend_alloc.c:2427)
==24461==    by 0xDEDC9E: _safe_emalloc (zend_alloc.c:2583)
==24461==    by 0x7D6346: zif_ibase_set_event_handler (ibase_events.c:343)
==24461==    by 0xEA71B1: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:550)
==24461==    by 0xEB1222: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2329)
==24461==    by 0xEA4E00: execute_ex (zend_vm_execute.h:363)
==24461==    by 0xEA5992: zend_execute (zend_vm_execute.h:388)
==24461==    by 0xE41F61: zend_execute_scripts (zend.c:1316)
==24461==    by 0xD656FC: php_execute_script (main.c:2506)
==24461==    by 0x1026445: do_cli (php_cli.c:994)
==24461==    by 0x1027BF2: main (php_cli.c:1378)
==24461== 
==24461== Invalid read of size 8
==24461==    at 0x7D4D93: _php_ibase_event_block (ibase_events.c:108)
==24461==    by 0x7D67A5: zif_ibase_set_event_handler (ibase_events.c:356)
==24461==    by 0xEA71B1: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:550)
==24461==    by 0xEB1222: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2329)
==24461==    by 0xEA4E00: execute_ex (zend_vm_execute.h:363)
==24461==    by 0xEA5992: zend_execute (zend_vm_execute.h:388)
==24461==    by 0xE41F61: zend_execute_scripts (zend.c:1316)
==24461==    by 0xD656FC: php_execute_script (main.c:2506)
==24461==    by 0x1026445: do_cli (php_cli.c:994)
==24461==    by 0x1027BF2: main (php_cli.c:1378)
==24461==  Address 0x1541ba10 is 8 bytes after a block of size 8 alloc'd
==24461==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==24461==    by 0xDED9A4: _emalloc (zend_alloc.c:2427)
==24461==    by 0xDEDC9E: _safe_emalloc (zend_alloc.c:2583)
==24461==    by 0x7D6346: zif_ibase_set_event_handler (ibase_events.c:343)
==24461==    by 0xEA71B1: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:550)
==24461==    by 0xEB1222: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2329)
==24461==    by 0xEA4E00: execute_ex (zend_vm_execute.h:363)
==24461==    by 0xEA5992: zend_execute (zend_vm_execute.h:388)
==24461==    by 0xE41F61: zend_execute_scripts (zend.c:1316)
==24461==    by 0xD656FC: php_execute_script (main.c:2506)
==24461==    by 0x1026445: do_cli (php_cli.c:994)
==24461==    by 0x1027BF2: main (php_cli.c:1378)
==24461== 
==24461== Invalid read of size 8
==24461==    at 0x7D4DA8: _php_ibase_event_block (ibase_events.c:108)
==24461==    by 0x7D67A5: zif_ibase_set_event_handler (ibase_events.c:356)
==24461==    by 0xEA71B1: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:550)
==24461==    by 0xEB1222: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2329)
==24461==    by 0xEA4E00: execute_ex (zend_vm_execute.h:363)
==24461==    by 0xEA5992: zend_execute (zend_vm_execute.h:388)
==24461==    by 0xE41F61: zend_execute_scripts (zend.c:1316)
==24461==    by 0xD656FC: php_execute_script (main.c:2506)
==24461==    by 0x1026445: do_cli (php_cli.c:994)
==24461==    by 0x1027BF2: main (php_cli.c:1378)
==24461==  Address 0x1541ba08 is 0 bytes after a block of size 8 alloc'd
==24461==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==24461==    by 0xDED9A4: _emalloc (zend_alloc.c:2427)
==24461==    by 0xDEDC9E: _safe_emalloc (zend_alloc.c:2583)
==24461==    by 0x7D6346: zif_ibase_set_event_handler (ibase_events.c:343)
==24461==    by 0xEA71B1: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:550)
==24461==    by 0xEB1222: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2329)
==24461==    by 0xEA4E00: execute_ex (zend_vm_execute.h:363)
==24461==    by 0xEA5992: zend_execute (zend_vm_execute.h:388)
==24461==    by 0xE41F61: zend_execute_scripts (zend.c:1316)
==24461==    by 0xD656FC: php_execute_script (main.c:2506)
==24461==    by 0x1026445: do_cli (php_cli.c:994)
==24461==    by 0x1027BF2: main (php_cli.c:1378)
==24461== 

 

Generated at Sat, 12 Apr 2014 09:02:23 +0000 (8 days ago)

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