From: drh <> Date: Mon, 9 Oct 2023 14:05:21 +0000 (+0000) Subject: Turn on SEH by default when building using MSVC. X-Git-Tag: version-3.44.0~139 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=50da20d5b112b393683dcc2bff6b08d618383441;p=thirdparty%2Fsqlite.git Turn on SEH by default when building using MSVC. FossilOrigin-Name: f57e8275cf1ab3ad8027044cda0893282d1c403a5aa9fabbb1c7de280597b5cd --- diff --git a/Makefile.msc b/Makefile.msc index fe442ff027..8ef8bd13b1 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -52,8 +52,8 @@ MINIMAL_AMALGAMATION = 0 USE_STDCALL = 0 !ENDIF -# Set this non-0 to use structured exception handling (SEH) for WAL mode -# in the core library. +# Use the USE_SEH=0 option on the nmake command line to omit structured +# exception handling (SEH) support. SEH is on by default. # !IFNDEF USE_SEH USE_SEH = 1 @@ -403,10 +403,11 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RBU=1 !ENDIF # Should structured exception handling (SEH) be enabled for WAL mode in -# the core library? +# the core library? It is on by default. Only omit it if the +# USE_SEH=0 option is provided on the nmake command-line. # -!IF $(USE_SEH)!=0 -OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_USE_SEH=1 +!IF $(USE_SEH)==0 +OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_OMIT_SEH=1 !ENDIF # These are the "extended" SQLite compilation options used when compiling for diff --git a/autoconf/Makefile.msc b/autoconf/Makefile.msc index 13663d8777..8a64e8f46f 100644 --- a/autoconf/Makefile.msc +++ b/autoconf/Makefile.msc @@ -52,8 +52,8 @@ MINIMAL_AMALGAMATION = 0 USE_STDCALL = 0 !ENDIF -# Set this non-0 to use structured exception handling (SEH) for WAL mode -# in the core library. +# Use the USE_SEH=0 option on the nmake command line to omit structured +# exception handling (SEH) support. SEH is on by default. # !IFNDEF USE_SEH USE_SEH = 1 @@ -325,10 +325,11 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RBU=1 !ENDIF # Should structured exception handling (SEH) be enabled for WAL mode in -# the core library? +# the core library? It is on by default. Only omit it if the +# USE_SEH=0 option is provided on the nmake command-line. # -!IF $(USE_SEH)!=0 -OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_USE_SEH=1 +!IF $(USE_SEH)==0 +OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_OMIT_SEH=1 !ENDIF # These are the "extended" SQLite compilation options used when compiling for diff --git a/manifest b/manifest index b8dc175a79..c0e78b388d 100644 --- a/manifest +++ b/manifest @@ -1,11 +1,11 @@ -C Fix\sa\spotential\sUAF\scaused\sby\sJSON\sparser\scache\sspill.\n[forum:/forumpost/b25edc1d46|Forum\spost\sb25edc1d46]. -D 2023-10-09T12:46:53.137 +C Turn\son\sSEH\sby\sdefault\swhen\sbuilding\susing\sMSVC. +D 2023-10-09T14:05:21.110 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 F Makefile.in bbf02cb8a9fb22d1cb78da7e5fb5e7e85a5b18cf5cb9e14c1b624db07029916d F Makefile.linux-gcc f3842a0b1efbfbb74ac0ef60e56b301836d05b4d867d014f714fa750048f1ab6 -F Makefile.msc f926abe4737ffa3303aeb67d8ea74857f4038754a95605c332be1c9dbf8b96c7 +F Makefile.msc e5c93ed28696ab0065e72ce352c7ec766c8b9e91f93fd1bb15000c6e35dfe58c F README.md 963d30019abf0cc06b263cd2824bce022893f3f93a531758f6f04ff2194a16a8 F VERSION 4c09b629c03b8ae32317cb336a32f3aa3252841d6dcd51184cecc4278d08f21e F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50 @@ -15,7 +15,7 @@ F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2 F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903 F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347 F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac -F autoconf/Makefile.msc 3248809e70cf439a13e9faf82a4e12cbdb7b042006300ac67175fc5125b5c031 +F autoconf/Makefile.msc 3dfe7dc4677569256724e4988db59521f10b1d8b8fba393ea8a255eb038b9825 F autoconf/README.first 6c4f34fe115ff55d4e8dbfa3cecf04a0188292f7 F autoconf/README.txt 42cfd21d0b19dc7d5d85fb5c405c5f3c6a4c923021c39128f6ba685355d8fd56 F autoconf/configure.ac ec7fa914c5e74ff212fe879f9bb6918e1234497e05facfb641f30c4d5893b277 @@ -659,7 +659,7 @@ F src/btreeInt.h 91a9e0c41a0e71fa91a742ec285c63dd8dcb38b73d14fae0ed7209174ff0fdc F src/build.c 79a4edcee69df5f20963d7b11faf0820d25e6f8c11ef3a9f868d14be87834711 F src/callback.c db3a45e376deff6a16c0058163fe0ae2b73a2945f3f408ca32cf74960b28d490 F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e -F src/ctime.c db847fac81837ff5e5028a5f7505147ac645ae676104adc5bc08e356f243de40 +F src/ctime.c 23331529e654be40ca97d171cbbffe9b3d4c71cc53b78fe5501230675952da8b F src/date.c eebc54a00e888d3c56147779e9f361b77d62fd69ff2008c5373946aa1ba1d574 F src/dbpage.c 80e46e1df623ec40486da7a5086cb723b0275a6e2a7b01d9f9b5da0f04ba2782 F src/dbstat.c 3b677254d512fcafd4d0b341bf267b38b235ccfddbef24f9154e19360fa22e43 @@ -719,7 +719,7 @@ F src/shell.c.in b34146fe139a7d0f5f49de5059e7bbe6892f9d5dce952c6f9f7a602e5df8646 F src/sqlite.h.in 4f39f61c35348f0c56dd2c7a2294d1f0564389a0086dab80ce0960bfd772dc1b F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8 F src/sqlite3ext.h 2f30b2671f4c03cd27a43f039e11251391066c97d11385f5f963bb40b03038ac -F src/sqliteInt.h 1fc2a2ee3016dd3ce433db8432bef50b8266d017527d38ccb8abed87c8305d76 +F src/sqliteInt.h c387a6d478db286330e611a97eb2beecbea1181b2a04abb30c5b90de74c26810 F src/sqliteLimit.h 33b1c9baba578d34efe7dfdb43193b366111cdf41476b1e82699e14c11ee1fb6 F src/status.c 160c445d7d28c984a0eae38c144f6419311ed3eace59b44ac6dafc20db4af749 F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1 @@ -2048,7 +2048,7 @@ F tool/max-limits.c cbb635fbb37ae4d05f240bfb5b5270bb63c54439 F tool/merge-test.tcl de76b62f2de2a92d4c1ca4f976bce0aea6899e0229e250479b229b2a1914b176 F tool/mkautoconfamal.sh 7077151b62ecb2848c5b2d36cdbcd8caa0b58f2c12dcdac6e982da39d29d213c F tool/mkccode.tcl 86463e68ce9c15d3041610fedd285ce32a5cf7a58fc88b3202b8b76837650dbe x -F tool/mkctimec.tcl c7246946f847d3d6d022f5276650e0290e2aa648793be2fb8c3f206347baa356 x +F tool/mkctimec.tcl 372452e24267dfe1b496eec3992d10c6e5e7d7870a152560cdcfe5404bc8cc04 x F tool/mkkeywordhash.c b9faa0ae7e14e4dbbcd951cddd786bf46b8a65bb07b129ba8c0cfade723aaffd F tool/mkmsvcmin.tcl 8897d515ef7f94772322db95a3b6fce6c614d84fe0bdd06ba5a1c786351d5a1d F tool/mkopcodec.tcl 33d20791e191df43209b77d37f0ff0904620b28465cca6990cf8d60da61a07ef @@ -2127,8 +2127,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 5c5397ff15543f4b3620244d9e57e15708eafcab1d42c9f87b4a60f0c01e8858 -R ef96c768d43529a9f0e56ea07269cc45 +P a163fecca90cab9d1b7bf8ebac78d498775eed7b6d81e7920e3401633c3a4b60 +R d8e67e543c6bc2983d62b297a1d54a3f U drh -Z b75470c169946884c1cac663c7d92420 +Z d910e6ddf87b0ff9b9f8c8908129c67e # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index e3e070c26a..341c8d3981 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -a163fecca90cab9d1b7bf8ebac78d498775eed7b6d81e7920e3401633c3a4b60 \ No newline at end of file +f57e8275cf1ab3ad8027044cda0893282d1c403a5aa9fabbb1c7de280597b5cd \ No newline at end of file diff --git a/src/ctime.c b/src/ctime.c index 03c89ff726..cf761299fe 100644 --- a/src/ctime.c +++ b/src/ctime.c @@ -639,6 +639,9 @@ static const char * const sqlite3azCompileOpt[] = { #ifdef SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS "OMIT_SCHEMA_VERSION_PRAGMAS", #endif +#ifdef SQLITE_OMIT_SEH + "OMIT_SEH", +#endif #ifdef SQLITE_OMIT_SHARED_CACHE "OMIT_SHARED_CACHE", #endif diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 7221974991..086570d66b 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -318,6 +318,16 @@ # endif #endif +/* +** Enable SQLITE_USE_SEH by default on MSVC builds. Only omit +** SEH support if the -DSQLITE_OMIT_SEH option is given. +*/ +#if defined(_MSC_VER) && !defined(SQLITE_OMIT_SEH) +# define SQLITE_USE_SEH 1 +#else +# undef SQLITE_USE_SEH 0 +#endif + /* ** The SQLITE_THREADSAFE macro must be defined as 0, 1, or 2. ** 0 means mutexes are permanently disable and the library is never diff --git a/tool/mkctimec.tcl b/tool/mkctimec.tcl index 23726a722f..098bf16e3b 100755 --- a/tool/mkctimec.tcl +++ b/tool/mkctimec.tcl @@ -239,6 +239,7 @@ set boolean_defnil_options { SQLITE_OMIT_REINDEX SQLITE_OMIT_SCHEMA_PRAGMAS SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS + SQLITE_OMIT_SEH SQLITE_OMIT_SHARED_CACHE SQLITE_OMIT_SHUTDOWN_DIRECTORIES SQLITE_OMIT_SUBQUERY