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/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

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

 

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

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