SQLite

View Ticket
Login
2019-02-22
21:35 Fixed ticket [4feb3159]: Crash due to misuse of window functions. plus 5 other changes (artifact: 17c4d9a5 user: drh)
19:24
Internally, remove all references to a Window object that belongs to an expression in an ORDER BY clause if that expression is converted to an alias of a result-set expression. Fix for [4feb3159c6]. (check-in: 579b66ea user: dan tags: trunk)
18:44 New ticket [4feb3159] Crash due to misuse of window functions.. (artifact: a24c0ec0 user: drh)

Ticket Hash: 4feb3159c6bc3f7e33959c233f91c347c584bebb
Title: Crash due to misuse of window functions.
Status: Fixed Type: Code_Defect
Severity: Critical Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2019-02-22 21:35:59
Version Found In: 3.27.1
User Comments:
drh added on 2019-02-22 18:44:24:

The following SQL statement causes a crash due to attempt to free memory that was not obtained from malloc():

SELECT +sum(0)OVER() ORDER BY +sum(0)OVER();

This problem has existed in all prior versions of SQLite that support window functions, beginning with version 3.25.0 (2018-09-15).