Valgrind Report for ext/interbase/tests/008.phpt ('InterBase: event handling')
Script
1:
<?php /* $Id$ */ 2: 3: require("interbase.inc"); 4: 5: $count = 0; 6: 7: function event_callback($event) 8: { 9: global $count; 10: if ($event == 'TEST1') echo "FAIL TEST1\n"; 11: return (++$count < 5); /* cancel event */ 12: } 13: 14: $link = ibase_connect($test_base); 15: 16: ibase_query("CREATE PROCEDURE pevent AS BEGIN POST_EVENT 'TEST1'; POST_EVENT 'TEST2'; END"); 17: ibase_commit(); 18: 19: $e = ibase_set_event_handler('event_callback','TEST1'); 20: ibase_free_event_handler($e); 21: 22: ibase_set_event_handler('event_callback','TEST2'); 23: 24: usleep(5E+5); 25: 26: for ($i = 0; $i < 8; ++$i) { 27: ibase_query("EXECUTE PROCEDURE pevent"); 28: ibase_commit(); 29: 30: usleep(3E+5); 31: } 32: 33: usleep(5E+5); 34: 35: if (!$count || $count > 5) echo "FAIL ($count)\n"; 36: echo "end of test\n"; 37: 38: ?> 39:
Report
==2678== Invalid read of size 8
==2678== at 0x7796B4: _php_ibase_event_block (ibase_events.c:108)
==2678== by 0x77B116: zif_ibase_set_event_handler (ibase_events.c:356)
==2678== by 0xDD5282: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==2678== by 0xDDF324: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2225)
==2678== by 0xDD33CC: execute (zend_vm_execute.h:410)
==2678== by 0xD77F06: zend_execute_scripts (zend.c:1315)
==2678== by 0xCAA557: php_execute_script (main.c:2494)
==2678== by 0xF45C87: do_cli (php_cli.c:988)
==2678== by 0xF472C4: main (php_cli.c:1364)
==2678== Address 0x14d8bac0 is 0 bytes after a block of size 32 alloc'd
==2678== at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==2678== by 0xD2A9DD: _emalloc (zend_alloc.c:2423)
==2678== by 0x77ACE1: zif_ibase_set_event_handler (ibase_events.c:345)
==2678== by 0xDD5282: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==2678== by 0xDDF324: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2225)
==2678== by 0xDD33CC: execute (zend_vm_execute.h:410)
==2678== by 0xD77F06: zend_execute_scripts (zend.c:1315)
==2678== by 0xCAA557: php_execute_script (main.c:2494)
==2678== by 0xF45C87: do_cli (php_cli.c:988)
==2678== by 0xF472C4: main (php_cli.c:1364)
==2678==
==2678== Invalid read of size 8
==2678== at 0x779708: _php_ibase_event_block (ibase_events.c:108)
==2678== by 0x77B116: zif_ibase_set_event_handler (ibase_events.c:356)
==2678== by 0xDD5282: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==2678== by 0xDDF324: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2225)
==2678== by 0xDD33CC: execute (zend_vm_execute.h:410)
==2678== by 0xD77F06: zend_execute_scripts (zend.c:1315)
==2678== by 0xCAA557: php_execute_script (main.c:2494)
==2678== by 0xF45C87: do_cli (php_cli.c:988)
==2678== by 0xF472C4: main (php_cli.c:1364)
==2678== Address 0x14d8ba98 is 8 bytes before a block of size 32 alloc'd
==2678== at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==2678== by 0xD2A9DD: _emalloc (zend_alloc.c:2423)
==2678== by 0x77ACE1: zif_ibase_set_event_handler (ibase_events.c:345)
==2678== by 0xDD5282: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==2678== by 0xDDF324: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2225)
==2678== by 0xDD33CC: execute (zend_vm_execute.h:410)
==2678== by 0xD77F06: zend_execute_scripts (zend.c:1315)
==2678== by 0xCAA557: php_execute_script (main.c:2494)
==2678== by 0xF45C87: do_cli (php_cli.c:988)
==2678== by 0xF472C4: main (php_cli.c:1364)
==2678==
==2678== Invalid read of size 8
==2678== at 0x779716: _php_ibase_event_block (ibase_events.c:108)
==2678== by 0x77B116: zif_ibase_set_event_handler (ibase_events.c:356)
==2678== by 0xDD5282: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==2678== by 0xDDF324: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2225)
==2678== by 0xDD33CC: execute (zend_vm_execute.h:410)
==2678== by 0xD77F06: zend_execute_scripts (zend.c:1315)
==2678== by 0xCAA557: php_execute_script (main.c:2494)
==2678== by 0xF45C87: do_cli (php_cli.c:988)
==2678== by 0xF472C4: main (php_cli.c:1364)
==2678== Address 0x14d8ba90 is 16 bytes before a block of size 32 alloc'd
==2678== at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==2678== by 0xD2A9DD: _emalloc (zend_alloc.c:2423)
==2678== by 0x77ACE1: zif_ibase_set_event_handler (ibase_events.c:345)
==2678== by 0xDD5282: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==2678== by 0xDDF324: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2225)
==2678== by 0xDD33CC: execute (zend_vm_execute.h:410)
==2678== by 0xD77F06: zend_execute_scripts (zend.c:1315)
==2678== by 0xCAA557: php_execute_script (main.c:2494)
==2678== by 0xF45C87: do_cli (php_cli.c:988)
==2678== by 0xF472C4: main (php_cli.c:1364)
==2678==
==2678== Invalid read of size 8
==2678== at 0x779724: _php_ibase_event_block (ibase_events.c:108)
==2678== by 0x77B116: zif_ibase_set_event_handler (ibase_events.c:356)
==2678== by 0xDD5282: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==2678== by 0xDDF324: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2225)
==2678== by 0xDD33CC: execute (zend_vm_execute.h:410)
==2678== by 0xD77F06: zend_execute_scripts (zend.c:1315)
==2678== by 0xCAA557: php_execute_script (main.c:2494)
==2678== by 0xF45C87: do_cli (php_cli.c:988)
==2678== by 0xF472C4: main (php_cli.c:1364)
==2678== Address 0x14d8ba88 is 24 bytes before a block of size 32 alloc'd
==2678== at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==2678== by 0xD2A9DD: _emalloc (zend_alloc.c:2423)
==2678== by 0x77ACE1: zif_ibase_set_event_handler (ibase_events.c:345)
==2678== by 0xDD5282: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==2678== by 0xDDF324: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2225)
==2678== by 0xDD33CC: execute (zend_vm_execute.h:410)
==2678== by 0xD77F06: zend_execute_scripts (zend.c:1315)
==2678== by 0xCAA557: php_execute_script (main.c:2494)
==2678== by 0xF45C87: do_cli (php_cli.c:988)
==2678== by 0xF472C4: main (php_cli.c:1364)
==2678==
==2678== Invalid read of size 8
==2678== at 0x779732: _php_ibase_event_block (ibase_events.c:108)
==2678== by 0x77B116: zif_ibase_set_event_handler (ibase_events.c:356)
==2678== by 0xDD5282: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==2678== by 0xDDF324: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2225)
==2678== by 0xDD33CC: execute (zend_vm_execute.h:410)
==2678== by 0xD77F06: zend_execute_scripts (zend.c:1315)
==2678== by 0xCAA557: php_execute_script (main.c:2494)
==2678== by 0xF45C87: do_cli (php_cli.c:988)
==2678== by 0xF472C4: main (php_cli.c:1364)
==2678== Address 0x14d8ba80 is not stack'd, malloc'd or (recently) free'd
==2678==
==2678== Invalid read of size 8
==2678== at 0x779740: _php_ibase_event_block (ibase_events.c:108)
==2678== by 0x77B116: zif_ibase_set_event_handler (ibase_events.c:356)
==2678== by 0xDD5282: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==2678== by 0xDDF324: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2225)
==2678== by 0xDD33CC: execute (zend_vm_execute.h:410)
==2678== by 0xD77F06: zend_execute_scripts (zend.c:1315)
==2678== by 0xCAA557: php_execute_script (main.c:2494)
==2678== by 0xF45C87: do_cli (php_cli.c:988)
==2678== by 0xF472C4: main (php_cli.c:1364)
==2678== Address 0x14d8ba78 is not stack'd, malloc'd or (recently) free'd
==2678==
==2678== Invalid read of size 8
==2678== at 0x77974E: _php_ibase_event_block (ibase_events.c:108)
==2678== by 0x77B116: zif_ibase_set_event_handler (ibase_events.c:356)
==2678== by 0xDD5282: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==2678== by 0xDDF324: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2225)
==2678== by 0xDD33CC: execute (zend_vm_execute.h:410)
==2678== by 0xD77F06: zend_execute_scripts (zend.c:1315)
==2678== by 0xCAA557: php_execute_script (main.c:2494)
==2678== by 0xF45C87: do_cli (php_cli.c:988)
==2678== by 0xF472C4: main (php_cli.c:1364)
==2678== Address 0x14d8ba70 is not stack'd, malloc'd or (recently) free'd
==2678==
==2678== Invalid read of size 8
==2678== at 0x77975C: _php_ibase_event_block (ibase_events.c:108)
==2678== by 0x77B116: zif_ibase_set_event_handler (ibase_events.c:356)
==2678== by 0xDD5282: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==2678== by 0xDDF324: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2225)
==2678== by 0xDD33CC: execute (zend_vm_execute.h:410)
==2678== by 0xD77F06: zend_execute_scripts (zend.c:1315)
==2678== by 0xCAA557: php_execute_script (main.c:2494)
==2678== by 0xF45C87: do_cli (php_cli.c:988)
==2678== by 0xF472C4: main (php_cli.c:1364)
==2678== Address 0x14d8ba68 is 16 bytes after a block of size 8 alloc'd
==2678== at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==2678== by 0xD2A9DD: _emalloc (zend_alloc.c:2423)
==2678== by 0xD2ACD4: _safe_emalloc (zend_alloc.c:2539)
==2678== by 0x77ACB7: zif_ibase_set_event_handler (ibase_events.c:343)
==2678== by 0xDD5282: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==2678== by 0xDDF324: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2225)
==2678== by 0xDD33CC: execute (zend_vm_execute.h:410)
==2678== by 0xD77F06: zend_execute_scripts (zend.c:1315)
==2678== by 0xCAA557: php_execute_script (main.c:2494)
==2678== by 0xF45C87: do_cli (php_cli.c:988)
==2678== by 0xF472C4: main (php_cli.c:1364)
==2678==
==2678== Invalid read of size 8
==2678== at 0x77976A: _php_ibase_event_block (ibase_events.c:108)
==2678== by 0x77B116: zif_ibase_set_event_handler (ibase_events.c:356)
==2678== by 0xDD5282: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==2678== by 0xDDF324: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2225)
==2678== by 0xDD33CC: execute (zend_vm_execute.h:410)
==2678== by 0xD77F06: zend_execute_scripts (zend.c:1315)
==2678== by 0xCAA557: php_execute_script (main.c:2494)
==2678== by 0xF45C87: do_cli (php_cli.c:988)
==2678== by 0xF472C4: main (php_cli.c:1364)
==2678== Address 0x14d8ba60 is 8 bytes after a block of size 8 alloc'd
==2678== at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==2678== by 0xD2A9DD: _emalloc (zend_alloc.c:2423)
==2678== by 0xD2ACD4: _safe_emalloc (zend_alloc.c:2539)
==2678== by 0x77ACB7: zif_ibase_set_event_handler (ibase_events.c:343)
==2678== by 0xDD5282: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==2678== by 0xDDF324: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2225)
==2678== by 0xDD33CC: execute (zend_vm_execute.h:410)
==2678== by 0xD77F06: zend_execute_scripts (zend.c:1315)
==2678== by 0xCAA557: php_execute_script (main.c:2494)
==2678== by 0xF45C87: do_cli (php_cli.c:988)
==2678== by 0xF472C4: main (php_cli.c:1364)
==2678==
==2678== Invalid read of size 8
==2678== at 0x77977F: _php_ibase_event_block (ibase_events.c:108)
==2678== by 0x77B116: zif_ibase_set_event_handler (ibase_events.c:356)
==2678== by 0xDD5282: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==2678== by 0xDDF324: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2225)
==2678== by 0xDD33CC: execute (zend_vm_execute.h:410)
==2678== by 0xD77F06: zend_execute_scripts (zend.c:1315)
==2678== by 0xCAA557: php_execute_script (main.c:2494)
==2678== by 0xF45C87: do_cli (php_cli.c:988)
==2678== by 0xF472C4: main (php_cli.c:1364)
==2678== Address 0x14d8ba58 is 0 bytes after a block of size 8 alloc'd
==2678== at 0x4C2794E: malloc (vg_replace_malloc.c:270)
==2678== by 0xD2A9DD: _emalloc (zend_alloc.c:2423)
==2678== by 0xD2ACD4: _safe_emalloc (zend_alloc.c:2539)
==2678== by 0x77ACB7: zif_ibase_set_event_handler (ibase_events.c:343)
==2678== by 0xDD5282: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:643)
==2678== by 0xDDF324: ZEND_DO_FCALL_SPEC_CONST_HANDLER (zend_vm_execute.h:2225)
==2678== by 0xDD33CC: execute (zend_vm_execute.h:410)
==2678== by 0xD77F06: zend_execute_scripts (zend.c:1315)
==2678== by 0xCAA557: php_execute_script (main.c:2494)
==2678== by 0xF45C87: do_cli (php_cli.c:988)
==2678== by 0xF472C4: main (php_cli.c:1364)
==2678==
==2678== Thread 3:
==2678== Conditional jump or move depends on uninitialised value(s)
==2678== at 0x77A353: _php_ibase_callback (ibase_events.c:231)
==2678== by 0x61A4ECB: ??? (in /usr/lib64/libfbclient.so.2.5.2)
==2678== by 0x617C535: ??? (in /usr/lib64/libfbclient.so.2.5.2)
==2678== by 0xE703850: start_thread (in /lib64/libpthread-2.12.so)
==2678== by 0xCFD790C: clone (in /lib64/libc-2.12.so)
==2678==
Generated at Tue, 21 May 2013 17:04:51 +0000 (2 days ago)
|