mirror of
https://github.com/sqlite/sqlite.git
synced 2026-01-13 20:39:27 +03:00
Fix a segfault that can occur if a malloc fails in ATTACH in shared-cache mode.
FossilOrigin-Name: 875f8fa32708b8dbf314fd7056fac2fefdacfa36
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