Needs a comment, or someone's gonna change it back as an optimization.
And needs to do something if the allocation fails.
Did you check what's on the stack when it crashes? Is this specific function going recursive somehow? Was the thread created with an 8KB stack? Is the app allocating some megabyte-sized chunks on the stack, and just barely squeezing by on native too?