PHP  
 PHP_5_3
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Valgrind Report for ext/sqlite/tests/sqlite_session_002.phpt ('sqlite, session destroy test')

Script

1: <?php
2:
/* Description: Tests that sqlite will destroy a session when used as a session handler
3: * Source code: ext/sqlite/sess_sqlite.c
4: */
5:
ob_start();
6:
session_save_path(__DIR__ "/sessiondb.sdb");
7:
8:
// start a session and save a value to it before commiting the session to the database
9:
session_start();
10:
$_SESSION["test"] = "foo_bar";
11:
session_write_close();
12:
13:
// remove the session value
14:
unset($_SESSION["test"]);
15:
var_dump(isset($_SESSION["test"]));
16:
17:
// start the session again and destroy it
18:
session_start();
19:
var_dump($_SESSION["test"]);
20:
session_destroy();
21:
session_write_close();
22:
23: unset(
$_SESSION["test"]);
24:
25:
// check that the session has been destroyed
26:
session_start();
27:
var_dump(isset($_SESSION["test"]));
28:
ob_end_flush();
29:
?>
30:

Report

==28544== Syscall param write(buf) points to uninitialised byte(s)
==28544==    at 0xCD1B790: __write_nocancel (in /lib64/libc-2.12.so)
==28544==    by 0xACE40B: sqliteOsWrite (os.c:1025)
==28544==    by 0xAD1619: pager_write_pagelist (pager.c:1262)
==28544==    by 0xAD39D7: sqlitepager_commit (pager.c:2020)
==28544==    by 0xAA9621: fileBtreeCommit (btree.c:906)
==28544==    by 0xAEE6CE: sqliteVdbeExec (vdbe.c:2228)
==28544==    by 0xAE86BC: sqlite_step (vdbe.c:128)
==28544==    by 0xACBB20: sqlite_exec (main.c:654)
==28544==    by 0xA9E184: ps_open_sqlite (sess_sqlite.c:62)
==28544==    by 0x99CCE0: php_session_initialize (session.c:511)
==28544==    by 0x9A26AA: php_session_start (session.c:1480)
==28544==    by 0x9A45F1: zif_session_start (session.c:1885)
==28544==  Address 0x14e23846 is 198 bytes inside a block of size 1,684 alloc'd
==28544==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==28544==    by 0xAE57AE: sqliteMallocRaw (util.c:268)
==28544==    by 0xAD1A70: sqlitepager_get (pager.c:1387)
==28544==    by 0xAA9BF7: fileBtreeCursor (btree.c:1056)
==28544==    by 0xAEEF4E: sqliteVdbeExec (vdbe.c:2416)
==28544==    by 0xAE86BC: sqlite_step (vdbe.c:128)
==28544==    by 0xACBB20: sqlite_exec (main.c:654)
==28544==    by 0xA9E184: ps_open_sqlite (sess_sqlite.c:62)
==28544==    by 0x99CCE0: php_session_initialize (session.c:511)
==28544==    by 0x9A26AA: php_session_start (session.c:1480)
==28544==    by 0x9A45F1: zif_session_start (session.c:1885)
==28544==    by 0xDBB76C: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==28544== 
==28544== Invalid write of size 1
==28544==    at 0xACB674: sqlite_close (main.c:571)
==28544==    by 0xA9E1DD: ps_close_sqlite (sess_sqlite.c:78)
==28544==    by 0x99A610: php_rshutdown_session_globals (session.c:95)
==28544==    by 0x9A53DE: zm_deactivate_session (session.c:2171)
==28544==    by 0xD7A42C: module_registry_cleanup (zend_API.c:2173)
==28544==    by 0xD85A2C: zend_hash_reverse_apply (zend_hash.c:757)
==28544==    by 0xD6C227: zend_deactivate_modules (zend.c:867)
==28544==    by 0xCB8029: php_request_shutdown (main.c:1643)
==28544==    by 0xEB1DFC: main (php_cli.c:1368)
==28544==  Address 0x14e5cb26 is 374 bytes inside a block of size 560 free'd
==28544==    at 0x4C274D4: free (vg_replace_malloc.c:468)
==28544==    by 0xAE5829: sqliteFree (util.c:279)
==28544==    by 0xACB889: sqlite_close (main.c:595)
==28544==    by 0xA9E1DD: ps_close_sqlite (sess_sqlite.c:78)
==28544==    by 0x99D6E0: php_session_save_current_state (session.c:624)
==28544==    by 0x9A289B: php_session_flush (session.c:1515)
==28544==    by 0x9A53BC: zm_deactivate_session (session.c:2169)
==28544==    by 0xD7A42C: module_registry_cleanup (zend_API.c:2173)
==28544==    by 0xD85A2C: zend_hash_reverse_apply (zend_hash.c:757)
==28544==    by 0xD6C227: zend_deactivate_modules (zend.c:867)
==28544==    by 0xCB8029: php_request_shutdown (main.c:1643)
==28544==    by 0xEB1DFC: main (php_cli.c:1368)
==28544== 
==28544== Invalid read of size 8
==28544==    at 0xAE8552: sqliteSafetyCheck (util.c:1129)
==28544==    by 0xACB686: sqlite_close (main.c:572)
==28544==    by 0xA9E1DD: ps_close_sqlite (sess_sqlite.c:78)
==28544==    by 0x99A610: php_rshutdown_session_globals (session.c:95)
==28544==    by 0x9A53DE: zm_deactivate_session (session.c:2171)
==28544==    by 0xD7A42C: module_registry_cleanup (zend_API.c:2173)
==28544==    by 0xD85A2C: zend_hash_reverse_apply (zend_hash.c:757)
==28544==    by 0xD6C227: zend_deactivate_modules (zend.c:867)
==28544==    by 0xCB8029: php_request_shutdown (main.c:1643)
==28544==    by 0xEB1DFC: main (php_cli.c:1368)
==28544==  Address 0x14e5cba0 is 496 bytes inside a block of size 560 free'd
==28544==    at 0x4C274D4: free (vg_replace_malloc.c:468)
==28544==    by 0xAE5829: sqliteFree (util.c:279)
==28544==    by 0xACB889: sqlite_close (main.c:595)
==28544==    by 0xA9E1DD: ps_close_sqlite (sess_sqlite.c:78)
==28544==    by 0x99D6E0: php_session_save_current_state (session.c:624)
==28544==    by 0x9A289B: php_session_flush (session.c:1515)
==28544==    by 0x9A53BC: zm_deactivate_session (session.c:2169)
==28544==    by 0xD7A42C: module_registry_cleanup (zend_API.c:2173)
==28544==    by 0xD85A2C: zend_hash_reverse_apply (zend_hash.c:757)
==28544==    by 0xD6C227: zend_deactivate_modules (zend.c:867)
==28544==    by 0xCB8029: php_request_shutdown (main.c:1643)
==28544==    by 0xEB1DFC: main (php_cli.c:1368)
==28544== 
==28544== Invalid read of size 4
==28544==    at 0xAE8376: sqliteSafetyOn (util.c:1091)
==28544==    by 0xACB6A8: sqlite_close (main.c:572)
==28544==    by 0xA9E1DD: ps_close_sqlite (sess_sqlite.c:78)
==28544==    by 0x99A610: php_rshutdown_session_globals (session.c:95)
==28544==    by 0x9A53DE: zm_deactivate_session (session.c:2171)
==28544==    by 0xD7A42C: module_registry_cleanup (zend_API.c:2173)
==28544==    by 0xD85A2C: zend_hash_reverse_apply (zend_hash.c:757)
==28544==    by 0xD6C227: zend_deactivate_modules (zend.c:867)
==28544==    by 0xCB8029: php_request_shutdown (main.c:1643)
==28544==    by 0xEB1DFC: main (php_cli.c:1368)
==28544==  Address 0x14e5cb80 is 464 bytes inside a block of size 560 free'd
==28544==    at 0x4C274D4: free (vg_replace_malloc.c:468)
==28544==    by 0xAE5829: sqliteFree (util.c:279)
==28544==    by 0xACB889: sqlite_close (main.c:595)
==28544==    by 0xA9E1DD: ps_close_sqlite (sess_sqlite.c:78)
==28544==    by 0x99D6E0: php_session_save_current_state (session.c:624)
==28544==    by 0x9A289B: php_session_flush (session.c:1515)
==28544==    by 0x9A53BC: zm_deactivate_session (session.c:2169)
==28544==    by 0xD7A42C: module_registry_cleanup (zend_API.c:2173)
==28544==    by 0xD85A2C: zend_hash_reverse_apply (zend_hash.c:757)
==28544==    by 0xD6C227: zend_deactivate_modules (zend.c:867)
==28544==    by 0xCB8029: php_request_shutdown (main.c:1643)
==28544==    by 0xEB1DFC: main (php_cli.c:1368)
==28544== 
==28544== Invalid read of size 4
==28544==    at 0xAE83B1: sqliteSafetyOn (util.c:1094)
==28544==    by 0xACB6A8: sqlite_close (main.c:572)
==28544==    by 0xA9E1DD: ps_close_sqlite (sess_sqlite.c:78)
==28544==    by 0x99A610: php_rshutdown_session_globals (session.c:95)
==28544==    by 0x9A53DE: zm_deactivate_session (session.c:2171)
==28544==    by 0xD7A42C: module_registry_cleanup (zend_API.c:2173)
==28544==    by 0xD85A2C: zend_hash_reverse_apply (zend_hash.c:757)
==28544==    by 0xD6C227: zend_deactivate_modules (zend.c:867)
==28544==    by 0xCB8029: php_request_shutdown (main.c:1643)
==28544==    by 0xEB1DFC: main (php_cli.c:1368)
==28544==  Address 0x14e5cb80 is 464 bytes inside a block of size 560 free'd
==28544==    at 0x4C274D4: free (vg_replace_malloc.c:468)
==28544==    by 0xAE5829: sqliteFree (util.c:279)
==28544==    by 0xACB889: sqlite_close (main.c:595)
==28544==    by 0xA9E1DD: ps_close_sqlite (sess_sqlite.c:78)
==28544==    by 0x99D6E0: php_session_save_current_state (session.c:624)
==28544==    by 0x9A289B: php_session_flush (session.c:1515)
==28544==    by 0x9A53BC: zm_deactivate_session (session.c:2169)
==28544==    by 0xD7A42C: module_registry_cleanup (zend_API.c:2173)
==28544==    by 0xD85A2C: zend_hash_reverse_apply (zend_hash.c:757)
==28544==    by 0xD6C227: zend_deactivate_modules (zend.c:867)
==28544==    by 0xCB8029: php_request_shutdown (main.c:1643)
==28544==    by 0xEB1DFC: main (php_cli.c:1368)
==28544== 
==28544== Invalid read of size 4
==28544==    at 0xAE83D4: sqliteSafetyOn (util.c:1095)
==28544==    by 0xACB6A8: sqlite_close (main.c:572)
==28544==    by 0xA9E1DD: ps_close_sqlite (sess_sqlite.c:78)
==28544==    by 0x99A610: php_rshutdown_session_globals (session.c:95)
==28544==    by 0x9A53DE: zm_deactivate_session (session.c:2171)
==28544==    by 0xD7A42C: module_registry_cleanup (zend_API.c:2173)
==28544==    by 0xD85A2C: zend_hash_reverse_apply (zend_hash.c:757)
==28544==    by 0xD6C227: zend_deactivate_modules (zend.c:867)
==28544==    by 0xCB8029: php_request_shutdown (main.c:1643)
==28544==    by 0xEB1DFC: main (php_cli.c:1368)
==28544==  Address 0x14e5cb80 is 464 bytes inside a block of size 560 free'd
==28544==    at 0x4C274D4: free (vg_replace_malloc.c:468)
==28544==    by 0xAE5829: sqliteFree (util.c:279)
==28544==    by 0xACB889: sqlite_close (main.c:595)
==28544==    by 0xA9E1DD: ps_close_sqlite (sess_sqlite.c:78)
==28544==    by 0x99D6E0: php_session_save_current_state (session.c:624)
==28544==    by 0x9A289B: php_session_flush (session.c:1515)
==28544==    by 0x9A53BC: zm_deactivate_session (session.c:2169)
==28544==    by 0xD7A42C: module_registry_cleanup (zend_API.c:2173)
==28544==    by 0xD85A2C: zend_hash_reverse_apply (zend_hash.c:757)
==28544==    by 0xD6C227: zend_deactivate_modules (zend.c:867)
==28544==    by 0xCB8029: php_request_shutdown (main.c:1643)
==28544==    by 0xEB1DFC: main (php_cli.c:1368)
==28544== 
==28544== Invalid read of size 1
==28544==    at 0xAE83F7: sqliteSafetyOn (util.c:1095)
==28544==    by 0xACB6A8: sqlite_close (main.c:572)
==28544==    by 0xA9E1DD: ps_close_sqlite (sess_sqlite.c:78)
==28544==    by 0x99A610: php_rshutdown_session_globals (session.c:95)
==28544==    by 0x9A53DE: zm_deactivate_session (session.c:2171)
==28544==    by 0xD7A42C: module_registry_cleanup (zend_API.c:2173)
==28544==    by 0xD85A2C: zend_hash_reverse_apply (zend_hash.c:757)
==28544==    by 0xD6C227: zend_deactivate_modules (zend.c:867)
==28544==    by 0xCB8029: php_request_shutdown (main.c:1643)
==28544==    by 0xEB1DFC: main (php_cli.c:1368)
==28544==  Address 0x14e5cb26 is 374 bytes inside a block of size 560 free'd
==28544==    at 0x4C274D4: free (vg_replace_malloc.c:468)
==28544==    by 0xAE5829: sqliteFree (util.c:279)
==28544==    by 0xACB889: sqlite_close (main.c:595)
==28544==    by 0xA9E1DD: ps_close_sqlite (sess_sqlite.c:78)
==28544==    by 0x99D6E0: php_session_save_current_state (session.c:624)
==28544==    by 0x9A289B: php_session_flush (session.c:1515)
==28544==    by 0x9A53BC: zm_deactivate_session (session.c:2169)
==28544==    by 0xD7A42C: module_registry_cleanup (zend_API.c:2173)
==28544==    by 0xD85A2C: zend_hash_reverse_apply (zend_hash.c:757)
==28544==    by 0xD6C227: zend_deactivate_modules (zend.c:867)
==28544==    by 0xCB8029: php_request_shutdown (main.c:1643)
==28544==    by 0xEB1DFC: main (php_cli.c:1368)
==28544== 
==28544== Invalid write of size 4
==28544==    at 0xAE8406: sqliteSafetyOn (util.c:1096)
==28544==    by 0xACB6A8: sqlite_close (main.c:572)
==28544==    by 0xA9E1DD: ps_close_sqlite (sess_sqlite.c:78)
==28544==    by 0x99A610: php_rshutdown_session_globals (session.c:95)
==28544==    by 0x9A53DE: zm_deactivate_session (session.c:2171)
==28544==    by 0xD7A42C: module_registry_cleanup (zend_API.c:2173)
==28544==    by 0xD85A2C: zend_hash_reverse_apply (zend_hash.c:757)
==28544==    by 0xD6C227: zend_deactivate_modules (zend.c:867)
==28544==    by 0xCB8029: php_request_shutdown (main.c:1643)
==28544==    by 0xEB1DFC: main (php_cli.c:1368)
==28544==  Address 0x14e5cb80 is 464 bytes inside a block of size 560 free'd
==28544==    at 0x4C274D4: free (vg_replace_malloc.c:468)
==28544==    by 0xAE5829: sqliteFree (util.c:279)
==28544==    by 0xACB889: sqlite_close (main.c:595)
==28544==    by 0xA9E1DD: ps_close_sqlite (sess_sqlite.c:78)
==28544==    by 0x99D6E0: php_session_save_current_state (session.c:624)
==28544==    by 0x9A289B: php_session_flush (session.c:1515)
==28544==    by 0x9A53BC: zm_deactivate_session (session.c:2169)
==28544==    by 0xD7A42C: module_registry_cleanup (zend_API.c:2173)
==28544==    by 0xD85A2C: zend_hash_reverse_apply (zend_hash.c:757)
==28544==    by 0xD6C227: zend_deactivate_modules (zend.c:867)
==28544==    by 0xCB8029: php_request_shutdown (main.c:1643)
==28544==    by 0xEB1DFC: main (php_cli.c:1368)
==28544== 
==28544== Invalid read of size 4
==28544==    at 0xAE8414: sqliteSafetyOn (util.c:1097)
==28544==    by 0xACB6A8: sqlite_close (main.c:572)
==28544==    by 0xA9E1DD: ps_close_sqlite (sess_sqlite.c:78)
==28544==    by 0x99A610: php_rshutdown_session_globals (session.c:95)
==28544==    by 0x9A53DE: zm_deactivate_session (session.c:2171)
==28544==    by 0xD7A42C: module_registry_cleanup (zend_API.c:2173)
==28544==    by 0xD85A2C: zend_hash_reverse_apply (zend_hash.c:757)
==28544==    by 0xD6C227: zend_deactivate_modules (zend.c:867)
==28544==    by 0xCB8029: php_request_shutdown (main.c:1643)
==28544==    by 0xEB1DFC: main (php_cli.c:1368)
==28544==  Address 0x14e5cb20 is 368 bytes inside a block of size 560 free'd
==28544==    at 0x4C274D4: free (vg_replace_malloc.c:468)
==28544==    by 0xAE5829: sqliteFree (util.c:279)
==28544==    by 0xACB889: sqlite_close (main.c:595)
==28544==    by 0xA9E1DD: ps_close_sqlite (sess_sqlite.c:78)
==28544==    by 0x99D6E0: php_session_save_current_state (session.c:624)
==28544==    by 0x9A289B: php_session_flush (session.c:1515)
==28544==    by 0x9A53BC: zm_deactivate_session (session.c:2169)
==28544==    by 0xD7A42C: module_registry_cleanup (zend_API.c:2173)
==28544==    by 0xD85A2C: zend_hash_reverse_apply (zend_hash.c:757)
==28544==    by 0xD6C227: zend_deactivate_modules (zend.c:867)
==28544==    by 0xCB8029: php_request_shutdown (main.c:1643)
==28544==    by 0xEB1DFC: main (php_cli.c:1368)
==28544== 
==28544== Invalid write of size 4
==28544==    at 0xAE8423: sqliteSafetyOn (util.c:1097)
==28544==    by 0xACB6A8: sqlite_close (main.c:572)
==28544==    by 0xA9E1DD: ps_close_sqlite (sess_sqlite.c:78)
==28544==    by 0x99A610: php_rshutdown_session_globals (session.c:95)
==28544==    by 0x9A53DE: zm_deactivate_session (session.c:2171)
==28544==    by 0xD7A42C: module_registry_cleanup (zend_API.c:2173)
==28544==    by 0xD85A2C: zend_hash_reverse_apply (zend_hash.c:757)
==28544==    by 0xD6C227: zend_deactivate_modules (zend.c:867)
==28544==    by 0xCB8029: php_request_shutdown (main.c:1643)
==28544==    by 0xEB1DFC: main (php_cli.c:1368)
==28544==  Address 0x14e5cb20 is 368 bytes inside a block of size 560 free'd
==28544==    at 0x4C274D4: free (vg_replace_malloc.c:468)
==28544==    by 0xAE5829: sqliteFree (util.c:279)
==28544==    by 0xACB889: sqlite_close (main.c:595)
==28544==    by 0xA9E1DD: ps_close_sqlite (sess_sqlite.c:78)
==28544==    by 0x99D6E0: php_session_save_current_state (session.c:624)
==28544==    by 0x9A289B: php_session_flush (session.c:1515)
==28544==    by 0x9A53BC: zm_deactivate_session (session.c:2169)
==28544==    by 0xD7A42C: module_registry_cleanup (zend_API.c:2173)
==28544==    by 0xD85A2C: zend_hash_reverse_apply (zend_hash.c:757)
==28544==    by 0xD6C227: zend_deactivate_modules (zend.c:867)
==28544==    by 0xCB8029: php_request_shutdown (main.c:1643)
==28544==    by 0xEB1DFC: main (php_cli.c:1368)
==28544== 

 

Generated at Fri, 18 Apr 2014 07:01:42 +0000 (19 hours ago)

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