What steps will reproduce the problem?
1. Run a debug build of logging_unittest from within MSVC.
What is the expected output? What do you see instead?
The Output window shows multiple instances of the message
"HEAP[logging_unittest.exe]: Invalid allocation size - 99999998 (exceeded
7ffdefff)".
What version of the product are you using? On what operating system?
v0.2.1 on Windows XP x64
Please provide any additional information below.
I traced these messages back to a call to GetComputerNameA in logging.cc.
According to the MSDN docs the size parameter of this function is used to
determine the size of the buffer which is passed in. However currently the
size is being passed a pointer to an uninitialized DWORD "len". "len" needs
to be initialized to the size of the buffer being passed in, which, also
according to the MSDN docs, only needs to be "MAX_COMPUTERNAME_LENGTH + 1"
characters large.
This also fixes the hostname included in log file names, which otherwise is
always empty.
Original issue reported on code.google.com by mag...@gmail.com on 29 May 2009 at 6:21
Original issue reported on code.google.com by
mag...@gmail.com
on 29 May 2009 at 6:21