PocketRent/hhvm-pgsql — pull request #45 by bountin (2014-12-31 15:37:21+00:00)
Title: Fixing strprintf to support two parallel statements

I, myself, am a C++ noob, so please double check this one thoroughly.

Without the va_copy the value of args after the first vsnprint is indeterminate according to the standard.
See http://stackoverflow.com/questions/10069597/regarding-vsnprintf-interview/10070606#10070606 or http://www.bailopan.net/blog/?p=30

I found this issue while having two prepared statements open, both having the same name and therefore the second one got rejected from the PostgreSQL server.