-
Type:
Bug
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 0.9.1, 0.9.2, 0.9.3, 0.10.0
-
Fix Version/s: None
-
Component/s: C++ - Library
-
Environment:
Ubuntu 12.04
Thrift 0.9.1
A server program with Thrift 0.9.1 always crash when receiving a specific packet from client. It's 100% reproducible by intentionally sending a packet consist of any 4 bytes followed with a 0.
After checking the code, it is found that the crash is caused by an assert in method TNonblockingServer::TConnection::workSocket() (line 494, file TNonblockingServer.cpp). To prevent the crash, protection code can be add to check readWant_ when receiving data from client.
The issue was found 0.9.1 and also exists in latter versions including latest code.