On 23 August 2015 at 19:06, Jakub Wilk wrote: > Apparently Pstreams calls std::char_traits::move() with destination buffer > set to NULL, which is undefined behavior even when length is 0.
No it isn't, the C++ standard places no requirements on the arguments to char_traits<char>::move. The fact that char_traits<char>::move() calls memmov with null pointers is a GCC bug, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65049 However, I'm not sure how or when I will fix the GCC bug so I might add a workaround in pstreams instead.

