kstenerud / KSCrash

The Ultimate iOS Crash Reporter
MIT License
4.23k stars 705 forks source link

Consider Increasing Thread Limit in CrashReport #533

Open GLinnik21 opened 1 month ago

GLinnik21 commented 1 month ago

Currently, the KSMachineContext struct in CrashReport has a fixed limit of 100 threads. This limitation may be insufficient for some applications. Since dynamically sizing this array isn't feasible due to its use in UNIX signal handling and mach-Exception, we need to consider whether increasing this limit is necessary.

https://github.com/kstenerud/KSCrash/blob/4f00ac9936c4d71d07262c7ad5bb5f6ab3994c8e/Sources/KSCrashRecordingCore/include/KSMachineContext_Apple.h#L44-L53

Would increasing the thread limit be beneficial, and if so, to what extent?

DmT021 commented 1 month ago

If we can't afford a really big array to guarantee all the threads will be captured, then we should at least guarantee that the crashed thread is in the report.