Open
Description
BusTub crashed immediately when input VALUES("xxx");
.
Such as follow:
bustub> VALUES ('123');
+--------------+
| __values#0.0 |
+--------------+
| 123 |
+--------------+
bustub> VALUES ("123");
AddressSanitizer:DEADLYSIGNAL
=================================================================
==15583==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x5634f19e280d bp 0x7ffc933d1290 sp 0x7ffc933d1270 T0)
which is securely handled on BustTub Web Shell
like this:
bustub> VALUES ("123");
unsupported TableReferenceType
But SELECT "xxx";
can be handled.
bustub> SELECT "123";
Message :: unsupported TableReferenceType
unsupported TableReferenceType
The following information maybe useful to locate the problem:
VALUE("xxx");
was parsed as:
PGList(VALUES("xxx"))
\
PGList(("xxx"))
\
PGNode(("xxx"))
\
PGColumnRef("xxx")
And for SELECT "xxx";
PGSelectStmt(SELECT "xxx")
\
PGList("xxx")
\
PGResTarget("xxx")
\
PGColumnRef("xxx")
They step in the same funtion src/binder/bind_select.cpp:Binder::BindColumnRef
but VALUE
has no binder.scope_
(nullptr).
Thus, VALUE("xxx")
takes runtime error on src/binder/bind_select.cpp:501
.
Metadata
Metadata
Assignees
Labels
No labels