# Can I make stack overflow warnings fatal?

**URL:** <https://discourse.julialang.org/t/can-i-make-stack-overflow-warnings-fatal/139579>\
**Category:** General Usage\
**Created:** [September 21, 2026, 9:59am UTC](https://discourse.julialang.org/t/can-i-make-stack-overflow-warnings-fatal/139579 "2026-09-21T09:59:20Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [September 21, 2026, 12:12pm UTC](https://discourse.julialang.org/t/can-i-make-stack-overflow-warnings-fatal/139579/2 "2026-09-21T12:12:03Z")

</div>

I see “fixed on master” here, so this might apply (on second thought it likely doesn’t):

> <https://github.com/julialang/julia/issues/60265>
>
> In julia 1.12.2 (Linux), I have this warning:
> 
> \`\`\`julia
> @inline \_\_tf(result, tim…e) = result
> @inline function \_\_tf(result, time::T, d1, dn...) where {T}
> return if d1 == 0
> \_\_tf((result..., T(0)), 0, dn...)
> else
> p, time2 = divrem(time, d1, RoundDown)
> \_\_tf((result..., T(p)), time2, dn...)
> end
> end
> 
> @inline function \_timetuple2(time, divi)
> return \_\_tf((), time, divi...)
> end
> 
> function timetuplefrac2(time)
> # 10 element tuple
> divi = (1.0f0, 0.041666668f0, 0.00069444446f0, 1.1574074f-5, 1.1574074f-8,
> 1.1574074f-11, 1.1574073f-14, 1.1574074f-17,
> 1.15740735f-20,
> 1.1574074f-23,
> )
> 
> return \_timetuple2(time, divi)
> end
> 
> time = 51545.0f0
> timetuplefrac2(time)
> \`\`\`
> 
> The full output is:
> \`\`\`
> julia\> timetuplefrac2(time)
> Warning: detected a stack overflow; program state may be corrupted, so further execution might be unreliable.
> Internal error: during type inference of
> timetuplefrac2(Float32)
> Encountered stack overflow.
> This might be caused by recursion over very long tuples or argument lists.
> (51545.0f0, 0.0f0, 0.0f0, 0.0f0, 0.0f0, 0.0f0, 0.0f0, 0.0f0, 0.0f0, 0.0f0)
> 
> \`\`\`
> 
> It used to work in julia 1.11 without this warning.
> I am wondering if a 10-element tuple, is already considered a very long tuple?
> Or what is the maximum number of inlining allowed?
> 
> Ref: https://github.com/JuliaGeo/CFTime.jl/issues/63

I’m looking into this, but need to run right now, what I found:

> [@StackOverflowError after only 14 calls to the same function?](https://discourse.julialang.org/t/stackoverflowerror-after-only-14-calls-to-the-same-function/133693):
>
> How many times does a function have to be called before a StackOverflowError is triggered? When I try with a simple recursive function call, it seems to be about 80,000. However, in my program, I have a function that is not recursive, but happens to call itself quite a few times - it is doing some post-processing analysis where one variable depends on others that depend on others, etc. but there is no cyclic dependency. The stacktrace below shows the error, but there are no ‘repeated’ entries, a…

---

_[View the full topic](https://discourse.julialang.org/t/can-i-make-stack-overflow-warnings-fatal/139579)._
