A problem with pthread

I create a thread using pthread. In this thread, it will be call a function(recursive function). in windows, it’s all ok, when running on android, it great probability will crash. At first, I thought the thread stack is too small. So I set the thread stack to 10M (even 100M), but the result is still the same. I do not know how to solve