Re: [tor-dev] test_memcpy() on Windows

2014-03-14 Thread Gisle Vanem
"Nick Mathewson" wrote: I assume this test works on Linux where AFAICS malloc() returns a buffer with zeros. If so, shouldn't calloc() be used in 'setup_data_buffer()' instead? The test is broken: it doesn't work on any platform. Look how buffer2 was copied directly from buffer1: they can't

Re: [tor-dev] test_memcpy() on Windows

2014-03-14 Thread Nick Mathewson
On Fri, Mar 14, 2014 at 6:53 AM, Gisle Vanem wrote: > The 'test_memcpy()' in tinytest_demo.c assumes there is a NUL in one of the > buffers. (the comment says so). That's not the case here on Windows. At > least not in MSVC debug-mode where malloc'ed buffers are filled with '0xCD'. > A snippet fro

[tor-dev] test_memcpy() on Windows

2014-03-14 Thread Gisle Vanem
The 'test_memcpy()' in tinytest_demo.c assumes there is a NUL in one of the buffers. (the comment says so). That's not the case here on Windows. At least not in MSVC debug-mode where malloc'ed buffers are filled with '0xCD'. A snippet from my output: ../ext/tinytest_demo.c:159: assert(db->buff