Added release build support. (#119)

* Cleaned up and updated cmake to have release build support.
* Added segfault handler.
* Added latest hpfs release build.
* Fixed coding issues revealed by release build.
This commit is contained in:
Ravin Perera
2020-09-16 17:51:54 +05:30
committed by GitHub
parent 64efc53cef
commit 93f57efbe3
9 changed files with 44 additions and 63 deletions

View File

@@ -202,12 +202,13 @@ namespace comm
{
// Prepare the memory segments to map with writev().
iovec memsegs[2];
uint8_t header_buf[SIZE_HEADER_LEN] = {0, 0, 0, 0, 0, 0, 0, 0};
if (is_binary)
{
// In binary mode, we need to prefix every message with the message size header.
uint8_t header_buf[SIZE_HEADER_LEN] = {0, 0, 0, 0, 0, 0, 0, 0};
uint32_t len = message.length();
// Reserve the first 4 bytes for future (TODO).
header_buf[4] = len >> 24;
header_buf[5] = (len >> 16) & 0xff;