Re:Pack: A New Container Format for Compressed Files
by OttoCoddo on Saturday March 23, 2024 @07:38PM
(#39803830)
It is not disabled, as you think. It is secured by the internal code in Pack. Almost all parts of Pack are multithreaded.
[ Parent
| on HN ]
Re:Pack: A New Container Format for Compressed Files
by raggi on Sunday March 24, 2024 @10:54AM
(#39807604)
it’s not safe to disable SQLite’s thread safety as you do here: https://github.com/PackOrganization/Pack/blob/main/Libraries... and then do your own locking. You attempt to pass the flag at open time to enable serialized mode, however quoting the SQLite docs for the build flag you set:
Note that when SQLite is compiled with SQLITE_THREADSAFE=0, the code to make SQLite threadsafe is omitted from the build. When this occurs, it is impossible to change the threading mode at start-time or run-time.
SQLite’s APIs are often hazardous in these ways, it really should be erroring rather than silently ignoring the fullmutex flag, but alas.