These functions were inappropriately mixing "end" and "top" pointer idioms. Specifically: 1. growSlowCase() was comparing a newEnd pointer against m_commitTop, and using this to compute the size that the stack needs to grow. 2. shrink() was wrongly computing excess capacity by subtracting baseOfStack() (which is at high memory) from m_commitTop (which points to lower memory). Also, baseOfStack() is an "end" pointer while m_commitTop is a "top" pointer. This is a mismatch. To fix this and simplify the code a bit, I changed all of these functions to take a newTopOfStack pointer instead of a newEnd pointer, and adjusted their callers where needed to pass the appropropriate pointer values.
Created attachment 219939 [details] the patch.
Landed in r161036 on the jsCStack branch: <http://trac.webkit.org/r161036>.
Comment on attachment 219939 [details] the patch. r=me
Thanks. Review status updated in r161934 on the jsCStack branch: <http://trac.webkit.org/r161934>.