Patch: auto_ptr is frequently abused in TSVN code
From: Dmitry <wipedout_at_yandex.ru>
Date: Thu, 27 Aug 2009 12:30:19 +0400
Hey.
In TSVN sources std::auto_ptr is often used for controlling arrays. This works by pure luck. auto_ptr destructor invokes delete but the array has been allocated with new[]. Pairing new[] with delete instead of with delete[] is undefined behaviour. This works because for primitive types VC++ maps new[] onto new but it might stop working with another version of C++ compiler.
Fixed this in two patches.
Best wishes.
------------------------------------------------------
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
|
This is an archived mail posted to the TortoiseSVN Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.