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_001.phpt ('sqlite, session storage test')

Script

1: <?php
2:
/* Description: Tests that sqlite can be used as a session save handler
3: * Source code: ext/sqlite/sess_sqlite.c
4: */
5:
6:
ob_start();
7:
session_save_path(__DIR__ "/sessiondb.sdb");
8:
9:
// create the session and set a session value
10:
session_start();
11:
$_SESSION["test"] = "foo_bar";
12:
13:
// close the session and unset the value
14:
session_write_close();
15: unset(
$_SESSION["test"]);
16:
var_dump(isset($_SESSION["test"]));
17:
18:
// start the session again and check that we have the proper value
19:
session_start();
20:
var_dump($_SESSION["test"]);
21:
ob_end_flush();
22:
?>
23:

Report

==22368== Syscall param write(buf) points to uninitialised byte(s)
==22368==    at 0xCD1C780: __write_nocancel (in /lib64/libc-2.12.so)
==22368==    by 0xACE40F: sqliteOsWrite (os.c:1025)
==22368==    by 0xAD161D: pager_write_pagelist (pager.c:1262)
==22368==    by 0xAD39DB: sqlitepager_commit (pager.c:2020)
==22368==    by 0xAA9625: fileBtreeCommit (btree.c:906)
==22368==    by 0xAEE6D2: sqliteVdbeExec (vdbe.c:2228)
==22368==    by 0xAE86C0: sqlite_step (vdbe.c:128)
==22368==    by 0xACBB24: sqlite_exec (main.c:654)
==22368==    by 0xA9E188: ps_open_sqlite (sess_sqlite.c:62)
==22368==    by 0x99CCE4: php_session_initialize (session.c:511)
==22368==    by 0x9A26AE: php_session_start (session.c:1480)
==22368==    by 0x9A45F5: zif_session_start (session.c:1885)
==22368==  Address 0x14e26236 is 198 bytes inside a block of size 1,684 alloc'd
==22368==    at 0x4C27AFA: malloc (vg_replace_malloc.c:291)
==22368==    by 0xAE57B2: sqliteMallocRaw (util.c:268)
==22368==    by 0xAD1A74: sqlitepager_get (pager.c:1387)
==22368==    by 0xAA9BFB: fileBtreeCursor (btree.c:1056)
==22368==    by 0xAEEF52: sqliteVdbeExec (vdbe.c:2416)
==22368==    by 0xAE86C0: sqlite_step (vdbe.c:128)
==22368==    by 0xACBB24: sqlite_exec (main.c:654)
==22368==    by 0xA9E188: ps_open_sqlite (sess_sqlite.c:62)
==22368==    by 0x99CCE4: php_session_initialize (session.c:511)
==22368==    by 0x9A26AE: php_session_start (session.c:1480)
==22368==    by 0x9A45F5: zif_session_start (session.c:1885)
==22368==    by 0xDBB770: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:322)
==22368== 
==22368== Invalid write of size 1
==22368==    at 0xACB678: sqlite_close (main.c:571)
==22368==    by 0xA9E1E1: ps_close_sqlite (sess_sqlite.c:78)
==22368==    by 0x99A614: php_rshutdown_session_globals (session.c:95)
==22368==    by 0x9A53E2: zm_deactivate_session (session.c:2171)
==22368==    by 0xD7A430: module_registry_cleanup (zend_API.c:2173)
==22368==    by 0xD85A30: zend_hash_reverse_apply (zend_hash.c:757)
==22368==    by 0xD6C22B: zend_deactivate_modules (zend.c:867)
==22368==    by 0xCB802D: php_request_shutdown (main.c:1643)
==22368==    by 0xEB1E00: main (php_cli.c:1368)
==22368==  Address 0x14e31be6 is 374 bytes inside a block of size 560 free'd
==22368==    at 0x4C274D4: free (vg_replace_malloc.c:468)
==22368==    by 0xAE582D: sqliteFree (util.c:279)
==22368==    by 0xACB88D: sqlite_close (main.c:595)
==22368==    by 0xA9E1E1: ps_close_sqlite (sess_sqlite.c:78)
==22368==    by 0x99D6E4: php_session_save_current_state (session.c:624)
==22368==    by 0x9A289F: php_session_flush (session.c:1515)
==22368==    by 0x9A53C0: zm_deactivate_session (session.c:2169)
==22368==    by 0xD7A430: module_registry_cleanup (zend_API.c:2173)
==22368==    by 0xD85A30: zend_hash_reverse_apply (zend_hash.c:757)
==22368==    by 0xD6C22B: zend_deactivate_modules (zend.c:867)
==22368==    by 0xCB802D: php_request_shutdown (main.c:1643)
==22368==    by 0xEB1E00: main (php_cli.c:1368)
==22368== 
==22368== Invalid read of size 8
==22368==    at 0xAE8556: sqliteSafetyCheck (util.c:1129)
==22368==    by 0xACB68A: sqlite_close (main.c:572)
==22368==    by 0xA9E1E1: ps_close_sqlite (sess_sqlite.c:78)
==22368==    by 0x99A614: php_rshutdown_session_globals (session.c:95)
==22368==    by 0x9A53E2: zm_deactivate_session (session.c:2171)
==22368==    by 0xD7A430: module_registry_cleanup (zend_API.c:2173)
==22368==    by 0xD85A30: zend_hash_reverse_apply (zend_hash.c:757)
==22368==    by 0xD6C22B: zend_deactivate_modules (zend.c:867)
==22368==    by 0xCB802D: php_request_shutdown (main.c:1643)
==22368==    by 0xEB1E00: main (php_cli.c:1368)
==22368==  Address 0x14e31c60 is 496 bytes inside a block of size 560 free'd
==22368==    at 0x4C274D4: free (vg_replace_malloc.c:468)
==22368==    by 0xAE582D: sqliteFree (util.c:279)
==22368==    by 0xACB88D: sqlite_close (main.c:595)
==22368==    by 0xA9E1E1: ps_close_sqlite (sess_sqlite.c:78)
==22368==    by 0x99D6E4: php_session_save_current_state (session.c:624)
==22368==    by 0x9A289F: php_session_flush (session.c:1515)
==22368==    by 0x9A53C0: zm_deactivate_session (session.c:2169)
==22368==    by 0xD7A430: module_registry_cleanup (zend_API.c:2173)
==22368==    by 0xD85A30: zend_hash_reverse_apply (zend_hash.c:757)
==22368==    by 0xD6C22B: zend_deactivate_modules (zend.c:867)
==22368==    by 0xCB802D: php_request_shutdown (main.c:1643)
==22368==    by 0xEB1E00: main (php_cli.c:1368)
==22368== 
==22368== Invalid read of size 4
==22368==    at 0xAE837A: sqliteSafetyOn (util.c:1091)
==22368==    by 0xACB6AC: sqlite_close (main.c:572)
==22368==    by 0xA9E1E1: ps_close_sqlite (sess_sqlite.c:78)
==22368==    by 0x99A614: php_rshutdown_session_globals (session.c:95)
==22368==    by 0x9A53E2: zm_deactivate_session (session.c:2171)
==22368==    by 0xD7A430: module_registry_cleanup (zend_API.c:2173)
==22368==    by 0xD85A30: zend_hash_reverse_apply (zend_hash.c:757)
==22368==    by 0xD6C22B: zend_deactivate_modules (zend.c:867)
==22368==    by 0xCB802D: php_request_shutdown (main.c:1643)
==22368==    by 0xEB1E00: main (php_cli.c:1368)
==22368==  Address 0x14e31c40 is 464 bytes inside a block of size 560 free'd
==22368==    at 0x4C274D4: free (vg_replace_malloc.c:468)
==22368==    by 0xAE582D: sqliteFree (util.c:279)
==22368==    by 0xACB88D: sqlite_close (main.c:595)
==22368==    by 0xA9E1E1: ps_close_sqlite (sess_sqlite.c:78)
==22368==    by 0x99D6E4: php_session_save_current_state (session.c:624)
==22368==    by 0x9A289F: php_session_flush (session.c:1515)
==22368==    by 0x9A53C0: zm_deactivate_session (session.c:2169)
==22368==    by 0xD7A430: module_registry_cleanup (zend_API.c:2173)
==22368==    by 0xD85A30: zend_hash_reverse_apply (zend_hash.c:757)
==22368==    by 0xD6C22B: zend_deactivate_modules (zend.c:867)
==22368==    by 0xCB802D: php_request_shutdown (main.c:1643)
==22368==    by 0xEB1E00: main (php_cli.c:1368)
==22368== 
==22368== Invalid read of size 4
==22368==    at 0xAE83B5: sqliteSafetyOn (util.c:1094)
==22368==    by 0xACB6AC: sqlite_close (main.c:572)
==22368==    by 0xA9E1E1: ps_close_sqlite (sess_sqlite.c:78)
==22368==    by 0x99A614: php_rshutdown_session_globals (session.c:95)
==22368==    by 0x9A53E2: zm_deactivate_session (session.c:2171)
==22368==    by 0xD7A430: module_registry_cleanup (zend_API.c:2173)
==22368==    by 0xD85A30: zend_hash_reverse_apply (zend_hash.c:757)
==22368==    by 0xD6C22B: zend_deactivate_modules (zend.c:867)
==22368==    by 0xCB802D: php_request_shutdown (main.c:1643)
==22368==    by 0xEB1E00: main (php_cli.c:1368)
==22368==  Address 0x14e31c40 is 464 bytes inside a block of size 560 free'd
==22368==    at 0x4C274D4: free (vg_replace_malloc.c:468)
==22368==    by 0xAE582D: sqliteFree (util.c:279)
==22368==    by 0xACB88D: sqlite_close (main.c:595)
==22368==    by 0xA9E1E1: ps_close_sqlite (sess_sqlite.c:78)
==22368==    by 0x99D6E4: php_session_save_current_state (session.c:624)
==22368==    by 0x9A289F: php_session_flush (session.c:1515)
==22368==    by 0x9A53C0: zm_deactivate_session (session.c:2169)
==22368==    by 0xD7A430: module_registry_cleanup (zend_API.c:2173)
==22368==    by 0xD85A30: zend_hash_reverse_apply (zend_hash.c:757)
==22368==    by 0xD6C22B: zend_deactivate_modules (zend.c:867)
==22368==    by 0xCB802D: php_request_shutdown (main.c:1643)
==22368==    by 0xEB1E00: main (php_cli.c:1368)
==22368== 
==22368== Invalid read of size 4
==22368==    at 0xAE83D8: sqliteSafetyOn (util.c:1095)
==22368==    by 0xACB6AC: sqlite_close (main.c:572)
==22368==    by 0xA9E1E1: ps_close_sqlite (sess_sqlite.c:78)
==22368==    by 0x99A614: php_rshutdown_session_globals (session.c:95)
==22368==    by 0x9A53E2: zm_deactivate_session (session.c:2171)
==22368==    by 0xD7A430: module_registry_cleanup (zend_API.c:2173)
==22368==    by 0xD85A30: zend_hash_reverse_apply (zend_hash.c:757)
==22368==    by 0xD6C22B: zend_deactivate_modules (zend.c:867)
==22368==    by 0xCB802D: php_request_shutdown (main.c:1643)
==22368==    by 0xEB1E00: main (php_cli.c:1368)
==22368==  Address 0x14e31c40 is 464 bytes inside a block of size 560 free'd
==22368==    at 0x4C274D4: free (vg_replace_malloc.c:468)
==22368==    by 0xAE582D: sqliteFree (util.c:279)
==22368==    by 0xACB88D: sqlite_close (main.c:595)
==22368==    by 0xA9E1E1: ps_close_sqlite (sess_sqlite.c:78)
==22368==    by 0x99D6E4: php_session_save_current_state (session.c:624)
==22368==    by 0x9A289F: php_session_flush (session.c:1515)
==22368==    by 0x9A53C0: zm_deactivate_session (session.c:2169)
==22368==    by 0xD7A430: module_registry_cleanup (zend_API.c:2173)
==22368==    by 0xD85A30: zend_hash_reverse_apply (zend_hash.c:757)
==22368==    by 0xD6C22B: zend_deactivate_modules (zend.c:867)
==22368==    by 0xCB802D: php_request_shutdown (main.c:1643)
==22368==    by 0xEB1E00: main (php_cli.c:1368)
==22368== 
==22368== Invalid read of size 1
==22368==    at 0xAE83FB: sqliteSafetyOn (util.c:1095)
==22368==    by 0xACB6AC: sqlite_close (main.c:572)
==22368==    by 0xA9E1E1: ps_close_sqlite (sess_sqlite.c:78)
==22368==    by 0x99A614: php_rshutdown_session_globals (session.c:95)
==22368==    by 0x9A53E2: zm_deactivate_session (session.c:2171)
==22368==    by 0xD7A430: module_registry_cleanup (zend_API.c:2173)
==22368==    by 0xD85A30: zend_hash_reverse_apply (zend_hash.c:757)
==22368==    by 0xD6C22B: zend_deactivate_modules (zend.c:867)
==22368==    by 0xCB802D: php_request_shutdown (main.c:1643)
==22368==    by 0xEB1E00: main (php_cli.c:1368)
==22368==  Address 0x14e31be6 is 374 bytes inside a block of size 560 free'd
==22368==    at 0x4C274D4: free (vg_replace_malloc.c:468)
==22368==    by 0xAE582D: sqliteFree (util.c:279)
==22368==    by 0xACB88D: sqlite_close (main.c:595)
==22368==    by 0xA9E1E1: ps_close_sqlite (sess_sqlite.c:78)
==22368==    by 0x99D6E4: php_session_save_current_state (session.c:624)
==22368==    by 0x9A289F: php_session_flush (session.c:1515)
==22368==    by 0x9A53C0: zm_deactivate_session (session.c:2169)
==22368==    by 0xD7A430: module_registry_cleanup (zend_API.c:2173)
==22368==    by 0xD85A30: zend_hash_reverse_apply (zend_hash.c:757)
==22368==    by 0xD6C22B: zend_deactivate_modules (zend.c:867)
==22368==    by 0xCB802D: php_request_shutdown (main.c:1643)
==22368==    by 0xEB1E00: main (php_cli.c:1368)
==22368== 
==22368== Invalid write of size 4
==22368==    at 0xAE840A: sqliteSafetyOn (util.c:1096)
==22368==    by 0xACB6AC: sqlite_close (main.c:572)
==22368==    by 0xA9E1E1: ps_close_sqlite (sess_sqlite.c:78)
==22368==    by 0x99A614: php_rshutdown_session_globals (session.c:95)
==22368==    by 0x9A53E2: zm_deactivate_session (session.c:2171)
==22368==    by 0xD7A430: module_registry_cleanup (zend_API.c:2173)
==22368==    by 0xD85A30: zend_hash_reverse_apply (zend_hash.c:757)
==22368==    by 0xD6C22B: zend_deactivate_modules (zend.c:867)
==22368==    by 0xCB802D: php_request_shutdown (main.c:1643)
==22368==    by 0xEB1E00: main (php_cli.c:1368)
==22368==  Address 0x14e31c40 is 464 bytes inside a block of size 560 free'd
==22368==    at 0x4C274D4: free (vg_replace_malloc.c:468)
==22368==    by 0xAE582D: sqliteFree (util.c:279)
==22368==    by 0xACB88D: sqlite_close (main.c:595)
==22368==    by 0xA9E1E1: ps_close_sqlite (sess_sqlite.c:78)
==22368==    by 0x99D6E4: php_session_save_current_state (session.c:624)
==22368==    by 0x9A289F: php_session_flush (session.c:1515)
==22368==    by 0x9A53C0: zm_deactivate_session (session.c:2169)
==22368==    by 0xD7A430: module_registry_cleanup (zend_API.c:2173)
==22368==    by 0xD85A30: zend_hash_reverse_apply (zend_hash.c:757)
==22368==    by 0xD6C22B: zend_deactivate_modules (zend.c:867)
==22368==    by 0xCB802D: php_request_shutdown (main.c:1643)
==22368==    by 0xEB1E00: main (php_cli.c:1368)
==22368== 
==22368== Invalid read of size 4
==22368==    at 0xAE8418: sqliteSafetyOn (util.c:1097)
==22368==    by 0xACB6AC: sqlite_close (main.c:572)
==22368==    by 0xA9E1E1: ps_close_sqlite (sess_sqlite.c:78)
==22368==    by 0x99A614: php_rshutdown_session_globals (session.c:95)
==22368==    by 0x9A53E2: zm_deactivate_session (session.c:2171)
==22368==    by 0xD7A430: module_registry_cleanup (zend_API.c:2173)
==22368==    by 0xD85A30: zend_hash_reverse_apply (zend_hash.c:757)
==22368==    by 0xD6C22B: zend_deactivate_modules (zend.c:867)
==22368==    by 0xCB802D: php_request_shutdown (main.c:1643)
==22368==    by 0xEB1E00: main (php_cli.c:1368)
==22368==  Address 0x14e31be0 is 368 bytes inside a block of size 560 free'd
==22368==    at 0x4C274D4: free (vg_replace_malloc.c:468)
==22368==    by 0xAE582D: sqliteFree (util.c:279)
==22368==    by 0xACB88D: sqlite_close (main.c:595)
==22368==    by 0xA9E1E1: ps_close_sqlite (sess_sqlite.c:78)
==22368==    by 0x99D6E4: php_session_save_current_state (session.c:624)
==22368==    by 0x9A289F: php_session_flush (session.c:1515)
==22368==    by 0x9A53C0: zm_deactivate_session (session.c:2169)
==22368==    by 0xD7A430: module_registry_cleanup (zend_API.c:2173)
==22368==    by 0xD85A30: zend_hash_reverse_apply (zend_hash.c:757)
==22368==    by 0xD6C22B: zend_deactivate_modules (zend.c:867)
==22368==    by 0xCB802D: php_request_shutdown (main.c:1643)
==22368==    by 0xEB1E00: main (php_cli.c:1368)
==22368== 
==22368== Invalid write of size 4
==22368==    at 0xAE8427: sqliteSafetyOn (util.c:1097)
==22368==    by 0xACB6AC: sqlite_close (main.c:572)
==22368==    by 0xA9E1E1: ps_close_sqlite (sess_sqlite.c:78)
==22368==    by 0x99A614: php_rshutdown_session_globals (session.c:95)
==22368==    by 0x9A53E2: zm_deactivate_session (session.c:2171)
==22368==    by 0xD7A430: module_registry_cleanup (zend_API.c:2173)
==22368==    by 0xD85A30: zend_hash_reverse_apply (zend_hash.c:757)
==22368==    by 0xD6C22B: zend_deactivate_modules (zend.c:867)
==22368==    by 0xCB802D: php_request_shutdown (main.c:1643)
==22368==    by 0xEB1E00: main (php_cli.c:1368)
==22368==  Address 0x14e31be0 is 368 bytes inside a block of size 560 free'd
==22368==    at 0x4C274D4: free (vg_replace_malloc.c:468)
==22368==    by 0xAE582D: sqliteFree (util.c:279)
==22368==    by 0xACB88D: sqlite_close (main.c:595)
==22368==    by 0xA9E1E1: ps_close_sqlite (sess_sqlite.c:78)
==22368==    by 0x99D6E4: php_session_save_current_state (session.c:624)
==22368==    by 0x9A289F: php_session_flush (session.c:1515)
==22368==    by 0x9A53C0: zm_deactivate_session (session.c:2169)
==22368==    by 0xD7A430: module_registry_cleanup (zend_API.c:2173)
==22368==    by 0xD85A30: zend_hash_reverse_apply (zend_hash.c:757)
==22368==    by 0xD6C22B: zend_deactivate_modules (zend.c:867)
==22368==    by 0xCB802D: php_request_shutdown (main.c:1643)
==22368==    by 0xEB1E00: main (php_cli.c:1368)
==22368== 

 

Generated at Sun, 27 Jul 2014 12:58:43 +0000 (4 days ago)

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