Skip to content

Crash potentially caused by BETWEEN operator #7860

@suyZhong

Description

@suyZhong

Considering the test cases below

CREATE TABLE t0(c0 INT, PRIMARY KEY(c0)); 
SELECT c0 FROM t0 WHERE (1 NOT BETWEEN false AND c0);

These statements caused a segmentation fault.

root@0df1192c09b7:/app/firebird# isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> CREATE DATABASE 'test';
SQL> CONNECT 'test';
Commit current transaction (y/n)?y
Committing.
Database: 'test', User: SYSDBA
SQL> CREATE TABLE t0(c0 INT, PRIMARY KEY(c0)); 
SQL> SELECT c0 FROM t0 WHERE (1 NOT BETWEEN false AND c0);
Segmentation fault (core dumped)
root@0df1192c09b7:/app/firebird# cat src/jrd/build_no.h | grep VER_STRING
#define PRODUCT_VER_STRING "6.0.0.132"
#define FILE_VER_STRING "WI-T6.0.0.132"
#define LICENSE_VER_STRING "WI-T6.0.0.132"

I found this in version 6.0.0.132 where I built from source code a0ff6b9

Metadata

Metadata