According to @iphydf's analysis, toxcore uses a maximum stack size of about 67-68kb (without compile optimizations). We're below our theoretical limit (older versions of musl allow up to 80kb), but it's still a little too close for comfort and could unintentionally be exceeded in the future. We should make an effort to look for unnecessarily large stack allocations and replace them with heap allocations.
According to @iphydf's analysis, toxcore uses a maximum stack size of about 67-68kb (without compile optimizations). We're below our theoretical limit (older versions of musl allow up to 80kb), but it's still a little too close for comfort and could unintentionally be exceeded in the future. We should make an effort to look for unnecessarily large stack allocations and replace them with heap allocations.