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/bug46247.phpt ('Bug #46247 (ibase_set_event_handler() is allowing to pass callback without event)')

Script

1: <?php
2:
3:
require("interbase.inc");
4:
5:
$db ibase_connect($test_base);
6:
7: function 
test() { }
8:
9:
ibase_set_event_handler();
10:
11:
ibase_set_event_handler('test'1);
12:
ibase_set_event_handler($db'test'1);
13:
ibase_set_event_handler(NULL'test'1);
14:
15:
16:
ibase_set_event_handler('foo'1);
17:
ibase_set_event_handler($db'foo'1);
18:
ibase_set_event_handler(NULL'foo'1);
19:
20:
?>
21:

Report

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

 

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

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