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

Segfault instead of stack overflow when passing a Type into infinitely recursing function #24862

Closed
goretkin opened this issue Nov 30, 2017 · 4 comments

Comments

@goretkin
Copy link
Contributor

goretkin commented Nov 30, 2017

               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.7.0-DEV.2693 (2017-11-29 11:47 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 0335175a66* (1 day old master)
|__/                   |  x86_64-apple-darwin14.5.0

julia> f(x) = f(x)
f (generic function with 1 method)

julia> f(0)
ERROR: StackOverflowError:
Stacktrace:
 [1] f(::Int64) at ./REPL[1]:1 (repeats 80000 times)

julia> f(Int)
Segmentation fault: 11

This happens on 0.6.0 and 0.6.1 too.

@goretkin goretkin changed the title Segfault instead of stack overflow on f Segfault instead of stack overflow when passing a Type into infinitely recursing function Nov 30, 2017
@rfourquet
Copy link
Member

On master it stack overflows also with a Int.

@goretkin
Copy link
Contributor Author

Oh, then this must have been fixed within the last day? Great!

@KristofferC
Copy link
Member

Dup of #14284, #17109, #17280, #19285, #21072, #21258, #22853

@StefanKarpinski
Copy link
Member

This is highly platform-dependent. Some OSes do a better job than others of reliably throwing a stack overflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants