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

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

 

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

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