On Lua, TBinaryProtocol and TCompactProtocol are using libluabpack.bunpack to pack/unpack double primitives.
The current implementation on luabpack.c is not handling the endianness of the doubles so when it interacts with implementations written on other languages it fails to convert the values.
A patch has been attached to this ticket. Tests to check the fix are WIP.
- The fix is assuming that the size of double is 8 bytes.