提交 7474a7e3 编写于 作者: A Azat Khuzhin

Increase buffer for uncaught exception / std::terminate

Use PIPE_BUF over some magic number 1024 in terminate_handler, since
according to pipe(7):

    PIPE_BUF
           POSIX.1  says  that  write(2)s of less than PIPE_BUF bytes must be atomic

Also note that 1024, is too small, especially for C++ stacktraces (and
especially for debug builds, that contains lots of non-inlined helpers
for various ptrs).
上级 3509fe88
......@@ -416,7 +416,7 @@ static void sanitizerDeathCallback()
else
log_message = "Terminate called without an active exception";
static const size_t buf_size = 1024;
static const size_t buf_size = PIPE_BUF;
if (log_message.size() > buf_size - 16)
log_message.resize(buf_size - 16);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册