# Stack overflowing on simple task

**URL:** https://forum.ada-lang.io/t/stack-overflowing-on-simple-task/4763
**Category:** General
**Tags:** embedded-stm32f429di
**Created:** [September 22, 2026, 7:46am UTC](https://forum.ada-lang.io/t/stack-overflowing-on-simple-task/4763 "2026-09-22T07:46:59Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Max](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/max/32/21_2.png) [@Max](https://forum.ada-lang.io/u/Max)
#### Post date: [September 22, 2026, 8:25am UTC](https://forum.ada-lang.io/t/stack-overflowing-on-simple-task/4763/3 "2026-09-22T08:25:21Z")

</div>

Switch `-fstack-check` works a bit weird on embedded targets as for me: it checks 4k free space in stack. My advice - don’t use it, or replace Stack\_Check routine by custom implementation.

See [How to protect from stack overflow on embedded targets?](https://forum.ada-lang.io/t/how-to-protect-from-stack-overflow-on-embedded-targets/4331)

---

_[View the full topic](https://forum.ada-lang.io/t/stack-overflowing-on-simple-task/4763)._
