Skip to content
New issue

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

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

Already on GitHub? # to your account

Missed stackoverflow on large tuple due to lack of stack probing #36170

Closed
tkf opened this issue Jun 6, 2020 · 2 comments
Closed

Missed stackoverflow on large tuple due to lack of stack probing #36170

tkf opened this issue Jun 6, 2020 · 2 comments

Comments

@tkf
Copy link
Member

tkf commented Jun 6, 2020

I get a segfault with

foldl(|>, repeat([x -> (x, x, x, x, x, x, x)], 8); init = (1,))

rr trace: https://s3.amazonaws.com/julialang-dumps/reports/2020-06-06T04-32-54-tkf.tar.zst

It creates a huge tuple so I'm not sure if I should be reporting this as a bug. But just in case you need yet another piece of code that is hostile to the compiler...

@Keno
Copy link
Member

Keno commented Jun 6, 2020

The issue is that this allocates a huge tuple on the stack, which then skips over the guard page, so we don't see it as a stack overflow. LLVM has "probe-stack" support which could mitigate this.

@Keno Keno changed the title Segfault with a large nested tuple Missed stackoverflow on large tuple due to lack of stack probing Jun 6, 2020
@c42f
Copy link
Member

c42f commented Jan 17, 2021

Seems related to #28577 — we discussed probe-stack there as well.

vtjnash added a commit that referenced this issue Mar 16, 2021
Supported platforms are currently X86, PowerPC, and SystemZ.

Fixes #25523
Fixes #36170
Closes #28577
Closes #30892
vtjnash added a commit that referenced this issue Mar 18, 2021
Supported platforms are currently X86, PowerPC, and SystemZ.

Fixes #25523
Fixes #36170
Closes #28577
Closes #30892
ElOceanografo pushed a commit to ElOceanografo/julia that referenced this issue May 4, 2021
antoine-levitt pushed a commit to antoine-levitt/julia that referenced this issue May 9, 2021
johanmon pushed a commit to johanmon/julia that referenced this issue Jul 5, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants