Serhiy Storchaka reported that Python 3.6 crashs earlier than Python 3.5 on calling json.dumps() when sys.setrecursionlimit() is increased.
I tested the script he wrote. Results on Python built in release mode:
Python 3.7:
...
58100 116204
Segmentation fault (core dumped)
Python 3.6:
...
74800 149604
Segmentation fault (core dumped)
Python 3.5:
...
74700 149404
Segmentation fault (core dumped)
Oh, it seems like Python 3.7 does crash earlier.
But to be clear, it's hard to control the usage of the C stack.