-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
bugSomething isn't workingSomething isn't working
Description
We use std::abort
in two places:
tntcxx/src/Client/Connection.hpp
Lines 404 to 414 in b89ebc6
template<class BUFFER, class NetProvider> | |
Response<BUFFER> | |
Connection<BUFFER, NetProvider>::getResponse(rid_t future) | |
{ | |
//This method does not tolerate extracting wrong future. | |
//Firstly user should invoke futureIsReady() to make sure future | |
//is present. | |
auto entry = impl->futures.find(future); | |
#ifndef NDEBUG | |
if (entry == impl->futures.end()) | |
std::abort(); |
tntcxx/src/Client/Connection.hpp
Lines 531 to 549 in b89ebc6
template<class BUFFER, class NetProvider> | |
DecodeStatus | |
processResponse(Connection<BUFFER, NetProvider> &conn, | |
Response<BUFFER> *result) | |
{ | |
//Decode response. In case of success - fill in feature map | |
//and adjust end-of-decoded data pointer. Call GC if needed. | |
if (! conn.impl->inBuf.has(conn.impl->endDecoded, MP_RESPONSE_SIZE)) | |
return DECODE_NEEDMORE; | |
Response<BUFFER> response; | |
response.size = conn.impl->dec.decodeResponseSize(); | |
if (response.size < 0) { | |
LOG_ERROR("Failed to decode response size"); | |
//In case of corrupted response size all other data in the buffer | |
//is likely to be decoded in the wrong way (since we don't | |
// know how much bytes should be skipped). So let's simply | |
//terminate here. | |
std::abort(); |
This is unacceptable for library code — we need to inspect these places and find an alternative.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working