mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Klues <>
Subject Re: Review Request 47481: Rewrote os::read() to be friendlier to reading binary data.
Date Wed, 18 May 2016 03:18:51 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated May 18, 2016, 3:18 a.m.)

Review request for mesos, Benjamin Mahler, Joris Van Remoortere, and switched to 'mcypark'.


Updated to use a heap allocated buffer instead of a stack allocated one.

Bugs: MESOS-5398

Repository: mesos


The previous read() implementation was based on calling getline() to
read in chunks of data from a file. This is fine for text-based files,
but is a little strange for binary files.

The new implementation reads in chunks of raw bytes into a stack
allocated buffer before copying them into their final location. I
usually don't like stack allocated buffers because of their potential
security implications when it comes to stack buffer overflows, but I
took extra care here to make sure there won't be any.

Diffs (updated)

  3rdparty/stout/include/stout/os/read.hpp e1e97c1bcb7493a734fc77721a83c230b1a23724 



make check -j


Kevin Klues

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message