JuliaLang/julia — Issue #503: segmentation fault - recursive function
Author: pb-jbullard
Created: 2012-03-02 08:56:38+00:00
State: open

Simple example below shows a segmentation fault for a recursive function call.

thanks, jim

_
_ _ _(_)_ |
(_) | (_) (_) | A fresh approach to technical computing
_ _ _| |_ __ _ |
| | | | | | |/ _` | | Version 0.0.0-prerelease
| | |_| | | | (_| | | Commit c84deda291 (2012-02-28 19:39:42)
_/ |\__'_|_|_|\__'_| |
|__/ |

julia> f(n) = if (n == 0) 0 else f(n-1) + n
end

julia> f(10)
55

julia> f(10000000000)
Segmentation fault: 11