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($db, null, 'TEST1'); 10: ibase_set_event_handler($db, 1, 'TEST1'); 11: ibase_set_event_handler('foobar', 'TEST1'); 12: 13: ?> 14:
Report
==27110== Invalid read of size 8
==27110== at 0x768E30: _php_ibase_event_block (ibase_events.c:108)
==27110== by 0x76A6E9: zif_ibase_set_event_handler (ibase_events.c:356)
==27110== by 0xDB8BD2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==27110== by 0xDBEEB1: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==27110== by 0xDB7C17: execute (zend_vm_execute.h:107)
==27110== by 0xD6B0B7: zend_execute_scripts (zend.c:1259)
==27110== by 0xCB7000: php_execute_script (main.c:2316)
==27110== by 0xEAE410: main (php_cli.c:1189)
==27110== Address 0x14d88e90 is 0 bytes after a block of size 32 alloc'd
==27110== at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==27110== by 0xD32860: _emalloc (zend_alloc.c:2348)
==27110== by 0x76A2FA: zif_ibase_set_event_handler (ibase_events.c:345)
==27110== by 0xDB8BD2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==27110== by 0xDBEEB1: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==27110== by 0xDB7C17: execute (zend_vm_execute.h:107)
==27110== by 0xD6B0B7: zend_execute_scripts (zend.c:1259)
==27110== by 0xCB7000: php_execute_script (main.c:2316)
==27110== by 0xEAE410: main (php_cli.c:1189)
==27110==
==27110== Invalid read of size 8
==27110== at 0x768E84: _php_ibase_event_block (ibase_events.c:108)
==27110== by 0x76A6E9: zif_ibase_set_event_handler (ibase_events.c:356)
==27110== by 0xDB8BD2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==27110== by 0xDBEEB1: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==27110== by 0xDB7C17: execute (zend_vm_execute.h:107)
==27110== by 0xD6B0B7: zend_execute_scripts (zend.c:1259)
==27110== by 0xCB7000: php_execute_script (main.c:2316)
==27110== by 0xEAE410: main (php_cli.c:1189)
==27110== Address 0x14d88e68 is 8 bytes before a block of size 32 alloc'd
==27110== at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==27110== by 0xD32860: _emalloc (zend_alloc.c:2348)
==27110== by 0x76A2FA: zif_ibase_set_event_handler (ibase_events.c:345)
==27110== by 0xDB8BD2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==27110== by 0xDBEEB1: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==27110== by 0xDB7C17: execute (zend_vm_execute.h:107)
==27110== by 0xD6B0B7: zend_execute_scripts (zend.c:1259)
==27110== by 0xCB7000: php_execute_script (main.c:2316)
==27110== by 0xEAE410: main (php_cli.c:1189)
==27110==
==27110== Invalid read of size 8
==27110== at 0x768E92: _php_ibase_event_block (ibase_events.c:108)
==27110== by 0x76A6E9: zif_ibase_set_event_handler (ibase_events.c:356)
==27110== by 0xDB8BD2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==27110== by 0xDBEEB1: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==27110== by 0xDB7C17: execute (zend_vm_execute.h:107)
==27110== by 0xD6B0B7: zend_execute_scripts (zend.c:1259)
==27110== by 0xCB7000: php_execute_script (main.c:2316)
==27110== by 0xEAE410: main (php_cli.c:1189)
==27110== Address 0x14d88e60 is 16 bytes before a block of size 32 alloc'd
==27110== at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==27110== by 0xD32860: _emalloc (zend_alloc.c:2348)
==27110== by 0x76A2FA: zif_ibase_set_event_handler (ibase_events.c:345)
==27110== by 0xDB8BD2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==27110== by 0xDBEEB1: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==27110== by 0xDB7C17: execute (zend_vm_execute.h:107)
==27110== by 0xD6B0B7: zend_execute_scripts (zend.c:1259)
==27110== by 0xCB7000: php_execute_script (main.c:2316)
==27110== by 0xEAE410: main (php_cli.c:1189)
==27110==
==27110== Invalid read of size 8
==27110== at 0x768EA0: _php_ibase_event_block (ibase_events.c:108)
==27110== by 0x76A6E9: zif_ibase_set_event_handler (ibase_events.c:356)
==27110== by 0xDB8BD2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==27110== by 0xDBEEB1: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==27110== by 0xDB7C17: execute (zend_vm_execute.h:107)
==27110== by 0xD6B0B7: zend_execute_scripts (zend.c:1259)
==27110== by 0xCB7000: php_execute_script (main.c:2316)
==27110== by 0xEAE410: main (php_cli.c:1189)
==27110== Address 0x14d88e58 is 24 bytes before a block of size 32 alloc'd
==27110== at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==27110== by 0xD32860: _emalloc (zend_alloc.c:2348)
==27110== by 0x76A2FA: zif_ibase_set_event_handler (ibase_events.c:345)
==27110== by 0xDB8BD2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==27110== by 0xDBEEB1: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==27110== by 0xDB7C17: execute (zend_vm_execute.h:107)
==27110== by 0xD6B0B7: zend_execute_scripts (zend.c:1259)
==27110== by 0xCB7000: php_execute_script (main.c:2316)
==27110== by 0xEAE410: main (php_cli.c:1189)
==27110==
==27110== Invalid read of size 8
==27110== at 0x768EAE: _php_ibase_event_block (ibase_events.c:108)
==27110== by 0x76A6E9: zif_ibase_set_event_handler (ibase_events.c:356)
==27110== by 0xDB8BD2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==27110== by 0xDBEEB1: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==27110== by 0xDB7C17: execute (zend_vm_execute.h:107)
==27110== by 0xD6B0B7: zend_execute_scripts (zend.c:1259)
==27110== by 0xCB7000: php_execute_script (main.c:2316)
==27110== by 0xEAE410: main (php_cli.c:1189)
==27110== Address 0x14d88e50 is not stack'd, malloc'd or (recently) free'd
==27110==
==27110== Invalid read of size 8
==27110== at 0x768EBC: _php_ibase_event_block (ibase_events.c:108)
==27110== by 0x76A6E9: zif_ibase_set_event_handler (ibase_events.c:356)
==27110== by 0xDB8BD2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==27110== by 0xDBEEB1: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==27110== by 0xDB7C17: execute (zend_vm_execute.h:107)
==27110== by 0xD6B0B7: zend_execute_scripts (zend.c:1259)
==27110== by 0xCB7000: php_execute_script (main.c:2316)
==27110== by 0xEAE410: main (php_cli.c:1189)
==27110== Address 0x14d88e48 is not stack'd, malloc'd or (recently) free'd
==27110==
==27110== Invalid read of size 8
==27110== at 0x768ECA: _php_ibase_event_block (ibase_events.c:108)
==27110== by 0x76A6E9: zif_ibase_set_event_handler (ibase_events.c:356)
==27110== by 0xDB8BD2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==27110== by 0xDBEEB1: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==27110== by 0xDB7C17: execute (zend_vm_execute.h:107)
==27110== by 0xD6B0B7: zend_execute_scripts (zend.c:1259)
==27110== by 0xCB7000: php_execute_script (main.c:2316)
==27110== by 0xEAE410: main (php_cli.c:1189)
==27110== Address 0x14d88e40 is not stack'd, malloc'd or (recently) free'd
==27110==
==27110== Invalid read of size 8
==27110== at 0x768ED8: _php_ibase_event_block (ibase_events.c:108)
==27110== by 0x76A6E9: zif_ibase_set_event_handler (ibase_events.c:356)
==27110== by 0xDB8BD2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==27110== by 0xDBEEB1: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==27110== by 0xDB7C17: execute (zend_vm_execute.h:107)
==27110== by 0xD6B0B7: zend_execute_scripts (zend.c:1259)
==27110== by 0xCB7000: php_execute_script (main.c:2316)
==27110== by 0xEAE410: main (php_cli.c:1189)
==27110== Address 0x14d88e38 is 16 bytes after a block of size 8 alloc'd
==27110== at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==27110== by 0xD32860: _emalloc (zend_alloc.c:2348)
==27110== by 0xD32B57: _safe_emalloc (zend_alloc.c:2454)
==27110== by 0x76A2D0: zif_ibase_set_event_handler (ibase_events.c:343)
==27110== by 0xDB8BD2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==27110== by 0xDBEEB1: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==27110== by 0xDB7C17: execute (zend_vm_execute.h:107)
==27110== by 0xD6B0B7: zend_execute_scripts (zend.c:1259)
==27110== by 0xCB7000: php_execute_script (main.c:2316)
==27110== by 0xEAE410: main (php_cli.c:1189)
==27110==
==27110== Invalid read of size 8
==27110== at 0x768EE6: _php_ibase_event_block (ibase_events.c:108)
==27110== by 0x76A6E9: zif_ibase_set_event_handler (ibase_events.c:356)
==27110== by 0xDB8BD2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==27110== by 0xDBEEB1: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==27110== by 0xDB7C17: execute (zend_vm_execute.h:107)
==27110== by 0xD6B0B7: zend_execute_scripts (zend.c:1259)
==27110== by 0xCB7000: php_execute_script (main.c:2316)
==27110== by 0xEAE410: main (php_cli.c:1189)
==27110== Address 0x14d88e30 is 8 bytes after a block of size 8 alloc'd
==27110== at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==27110== by 0xD32860: _emalloc (zend_alloc.c:2348)
==27110== by 0xD32B57: _safe_emalloc (zend_alloc.c:2454)
==27110== by 0x76A2D0: zif_ibase_set_event_handler (ibase_events.c:343)
==27110== by 0xDB8BD2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==27110== by 0xDBEEB1: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==27110== by 0xDB7C17: execute (zend_vm_execute.h:107)
==27110== by 0xD6B0B7: zend_execute_scripts (zend.c:1259)
==27110== by 0xCB7000: php_execute_script (main.c:2316)
==27110== by 0xEAE410: main (php_cli.c:1189)
==27110==
==27110== Invalid read of size 8
==27110== at 0x768EFB: _php_ibase_event_block (ibase_events.c:108)
==27110== by 0x76A6E9: zif_ibase_set_event_handler (ibase_events.c:356)
==27110== by 0xDB8BD2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==27110== by 0xDBEEB1: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==27110== by 0xDB7C17: execute (zend_vm_execute.h:107)
==27110== by 0xD6B0B7: zend_execute_scripts (zend.c:1259)
==27110== by 0xCB7000: php_execute_script (main.c:2316)
==27110== by 0xEAE410: main (php_cli.c:1189)
==27110== Address 0x14d88e28 is 0 bytes after a block of size 8 alloc'd
==27110== at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==27110== by 0xD32860: _emalloc (zend_alloc.c:2348)
==27110== by 0xD32B57: _safe_emalloc (zend_alloc.c:2454)
==27110== by 0x76A2D0: zif_ibase_set_event_handler (ibase_events.c:343)
==27110== by 0xDB8BD2: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==27110== by 0xDBEEB1: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:1632)
==27110== by 0xDB7C17: execute (zend_vm_execute.h:107)
==27110== by 0xD6B0B7: zend_execute_scripts (zend.c:1259)
==27110== by 0xCB7000: php_execute_script (main.c:2316)
==27110== by 0xEAE410: main (php_cli.c:1189)
==27110==
Generated at Sun, 19 May 2013 20:27:25 +0000 (4 days ago)
|