Github user gadLinux commented on the issue:
https://github.com/apache/thrift/pull/1361
Rebased and lots of fixes added. Crossing fingers.
I should opened a new issue but since all bug fixing were discovered while
doing this incident I took the opportunity to fix everything here. ---
