Skip to content

[DEV BUILD] DuckDB Crash with Correlated Aggregation inside a WITH clauseΒ #18703

@joyemang33

Description

@joyemang33

What happens?

Hi! I found the following query will cause SIGSEGV (Address boundary error) from DuckDB.

To Reproduce

Run the following statements in DuckDB CLI

CREATE TABLE t0(c0 INT);
CREATE TABLE t1(c0 BOOLEAN);

SELECT * FROM t0
WHERE EXISTS (
  SELECT 1
  FROM t1
  WHERE (WITH seq(i) AS (VALUES (1)) SELECT SUM(i) * t0.c0 FROM seq) IS NOT NULL
);

OS:

Ubuntu 24.04.1 LTS, x86_64, Linux 6.14.0-1010-aws (AWS EC2)

DuckDB Version:

v1.4.0-dev2739 (Development Version)

DuckDB Client:

CLI

Hardware:

No response

Full Name:

Qiuyang Mang

Affiliation:

UC Berkeley

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a nightly build

Did you include all relevant data sets for reproducing the issue?

Yes

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?

  • Yes, I have

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions