From: drh <> Date: Tue, 18 Nov 2025 17:27:46 +0000 (+0000) Subject: Add support for SQLITE_LIMIT_PARSER_DEPTH to limit the size of the stack X-Git-Tag: artiphishell~222 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b43acc7183b67ea3d708344c0c939dbf424ac87;p=thirdparty%2Fsqlite.git Add support for SQLITE_LIMIT_PARSER_DEPTH to limit the size of the stack used by the parser. This can help prevent deeply nested parse trees that then cause problems on machines with smaller CPU stacks. Modify the %realloc and %free directives of Lemon and add the new %stack_size_limit directive in support of this capability. FossilOrigin-Name: 52ba0c731d004409353a55ce8ca5a514ce486a077a2be82db5b8fea7619848d5 --- 4b43acc7183b67ea3d708344c0c939dbf424ac87 diff --cc manifest index 94b2a3a9ee,e7c1491bbe..93c431eeb0 --- a/manifest +++ b/manifest @@@ -1,5 -1,5 +1,5 @@@ - C Fix\sincorrect\s"#line"\sgeneration\sin\sLemon. - D 2025-11-18T10:38:41.356 -C Modify\sthe\s"%realloc"\sand\s"%free"\scommands\sin\sLemon\sso\sthat\sthe\sfunctions\nthey\sspecify\stake\san\sextra\sparameter\sat\sthe\send,\sthe\s%extra_context\spointer.\nThis\sallows\sthe\simplementation\sto\sdistinguish\sbetween\sOOM\serrors\sand\nfailures\sto\sincrease\sthe\sstack\ssize\sbecause\sof\sthe\sstack\ssize\slimit. -D 2025-11-18T15:40:02.793 ++C Add\ssupport\sfor\sSQLITE_LIMIT_PARSER_DEPTH\sto\slimit\sthe\ssize\sof\sthe\sstack\nused\sby\sthe\sparser.\s\sThis\scan\shelp\sprevent\sdeeply\snested\sparse\strees\sthat\nthen\scause\sproblems\son\smachines\swith\ssmaller\sCPU\sstacks.\s\sModify\sthe\n%realloc\sand\s%free\sdirectives\sof\sLemon\sand\sadd\sthe\snew\s%stack_size_limit\ndirective\sin\ssupport\sof\sthis\scapability. ++D 2025-11-18T17:27:46.970 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea @@@ -2166,8 -2166,8 +2166,9 @@@ F tool/version-info.c 33d0390ef484b3b1c F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7 F tool/warnings.sh d924598cf2f55a4ecbc2aeb055c10bd5f48114793e7ba25f9585435da29e7e98 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f - P ea48567ac54e4949a8b68977a58a5de7946e074ae8737133071d02f40ac97f34 - R 956e0d8d894da87712e963f1d74f3842 -P 41fe19ab054acda912bc32dd6f9c6412416ab1af6cf55515e96c89fb55b46424 ++P 5c0214df2c0a7470ac2edca0c483a3edd3c39ef0739688ab9a06e23882200360 9862c945d9a8531f9bef123aee9ed1fd3f64542250a57beb3a150227bc3c1a12 + R eaedc8a6fb66bf638a3308ee531542c6 ++T +closed 9862c945d9a8531f9bef123aee9ed1fd3f64542250a57beb3a150227bc3c1a12 U drh - Z 160fdfae770c78987ceedbc701266298 -Z cd45861cdfb2c55973d9d3bae678a719 ++Z 8fa707feb9cf8e2d7e31b1de8f81f137 # Remove this line to create a well-formed Fossil manifest. diff --cc manifest.uuid index 2a8ebfafeb,fbcb312fee..da46dff811 --- a/manifest.uuid +++ b/manifest.uuid @@@ -1,1 -1,1 +1,1 @@@ - 5c0214df2c0a7470ac2edca0c483a3edd3c39ef0739688ab9a06e23882200360 -9862c945d9a8531f9bef123aee9ed1fd3f64542250a57beb3a150227bc3c1a12 ++52ba0c731d004409353a55ce8ca5a514ce486a077a2be82db5b8fea7619848d5