[robocup-small] Referee Box Bug Fix
Christopher Head
chead at interchange.ubc.ca
Sat Apr 17 18:06:28 EDT 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I've attached another small patch to the referee box, this one to fix a
bug that affects some people and not others. Specifically, in
logging.cc, there is a call to va_start(), and the va_list is used in
both vsnprintf and vprintf. According to the man page:
> These functions do not call the va_end macro. Because they invoke
> the va_arg macro, the value of ap is undefined after the call.
The attached patch fixes this by just reusing the "message" buffer
instead. This crashes the refbox on a 64-bit machine running GCC 4.4.1.
Thanks!
Chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: GnuPT 2.7.2
iEYEARECAAYFAkvKMOgACgkQXUF6hOTGP7dPjwCfTphbH+5TM6pNla0wKgd39rmB
yhIAnieLM5zMXzCDbGz+uhzGXtRdhlWL
=CX2Y
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-valist
Type: application/octet-stream
Size: 288 bytes
Desc: not available
Url : http://lists.cc.gatech.edu/pipermail/robocup-small/attachments/20100417/c7ab2cc0/attachment.obj
More information about the robocup-small
mailing list