Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clickhouse-client segfaults on a long query #10283

Closed
akuzm opened this issue Apr 15, 2020 · 6 comments · Fixed by #10295
Closed

clickhouse-client segfaults on a long query #10283

akuzm opened this issue Apr 15, 2020 · 6 comments · Fixed by #10295
Assignees
Labels
bug Confirmed user-visible misbehaviour in official release

Comments

@akuzm
Copy link
Contributor

akuzm commented Apr 15, 2020

The query is like select coalesce(null, coalesce(null, ....repeat 1000x...., 1) ... ):

$ { printf "select "; for x in {1..1000}; do printf "coalesce(null, "; done; printf "1"; for x in {1..1000}; do printf ")"; done; } | clickhouse-client
Segmentation fault (core dumped)
@akuzm akuzm added the bug Confirmed user-visible misbehaviour in official release label Apr 15, 2020
@alexey-milovidov
Copy link
Member

Reproduced successfully!

@alexey-milovidov alexey-milovidov self-assigned this Apr 15, 2020
@alexey-milovidov
Copy link
Member

Stack overflow.

@alexey-milovidov
Copy link
Member

We have a function checkStackSize for this purpose.
It's strange that it's not used in parser.

@alexey-milovidov
Copy link
Member

Looks like the bug was introduced in #8647

@alexey-milovidov
Copy link
Member

No, it was before.

@jakesylvestre
Copy link

what sets the max_stack_size?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed user-visible misbehaviour in official release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants