1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Avoid evaluating (INT_MIN/-1) with 32 bit signed numbers. It can cause SIGFPE. (CVS 3945)

FossilOrigin-Name: 2f186e916c982cde557e0bc1b925b10e6d58f8a1
This commit is contained in:
danielk1977
2007-05-08 13:57:34 +00:00
parent dce872b94e
commit 4b5710e486
4 changed files with 16 additions and 13 deletions

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is testing expressions.
#
# $Id: expr.test,v 1.53 2007/04/06 02:32:35 drh Exp $
# $Id: expr.test,v 1.54 2007/05/08 13:57:34 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -135,6 +135,9 @@ test_expr expr-1.101 {i1=0, i2=''} {i1=i2} 0
#
test_expr expr-1.102 {i1=40, i2=1} {i2<<i1} 1099511627776
test_expr expr-1.103 {i1=0} {(-2147483648.0 % -1)} 0.0
test_expr expr-1.104 {i1=0} {(-9223372036854775808 % -1)} 0.0
test_expr expr-1.105 {i1=0} {(-9223372036854775808 / -1)>1} 1
test_expr expr-2.1 {r1=1.23, r2=2.34} {r1+r2} 3.57
test_expr expr-2.2 {r1=1.23, r2=2.34} {r1-r2} -1.11