mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Fix a segfault that can occur if a malloc fails in ATTACH in shared-cache mode.
FossilOrigin-Name: e37137376a2b23062e2625b5285299b33630b326
This commit is contained in:
@ -60,4 +60,17 @@ do_malloc_test attachmalloc-2 -tclprep {
|
||||
ATTACH 'test2.db' AS db1;
|
||||
}
|
||||
|
||||
set enable_shared_cache [sqlite3_enable_shared_cache 1]
|
||||
sqlite3 dbaux test2.db
|
||||
dbaux eval {SELECT * FROM sqlite_master}
|
||||
do_malloc_test attachmalloc-3 -sqlbody {
|
||||
SELECT * FROM sqlite_master;
|
||||
ATTACH 'test2.db' AS two;
|
||||
} -cleanup {
|
||||
db eval { DETACH two }
|
||||
}
|
||||
dbaux close
|
||||
sqlite3_enable_shared_cache $enable_shared_cache
|
||||
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user