1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Add the capability to track the maximum depth of the LALR(1) parser stack

so that critical applications can check to see if they are getting close
to limits. (CVS 5481)

FossilOrigin-Name: ef0250f3dc769a4acd534f31fa06d90922d4145b
This commit is contained in:
drh
2008-07-25 15:39:03 +00:00
parent 1bb14aca96
commit ec424a5be6
10 changed files with 70 additions and 23 deletions

View File

@ -11,7 +11,7 @@
# This file implements some common TCL routines used for regression
# testing the SQLite library
#
# $Id: tester.tcl,v 1.132 2008/07/12 15:55:55 danielk1977 Exp $
# $Id: tester.tcl,v 1.133 2008/07/25 15:39:04 drh Exp $
#
# What for user input before continuing. This gives an opportunity
@ -382,6 +382,11 @@ proc show_memstats {} {
set x [sqlite3_status SQLITE_STATUS_SCRATCH_OVERFLOW 0]
set val [format {now %10d max %10d} [lindex $x 1] [lindex $x 2]]
puts "Scratch overflow: $val"
ifcapable yytrackmaxstackdepth {
set x [sqlite3_status SQLITE_STATUS_PARSER_STACK 0]
set val [format { max %10d} [lindex $x 2]]
puts "Parser stack depth: $val"
}
set x [sqlite3_status SQLITE_STATUS_MALLOC_SIZE 0]
puts "Maximum alloc size: [lindex $x 2]"
}