[Libreoffice-commits] core.git: salhelper/source

Tor Lillqvist tml at collabora.com
Thu Aug 6 00:25:35 PDT 2015


 salhelper/source/simplereferenceobject.cxx |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 3a2929e3f8dd3b0c57bc0c5e8496d23b6f63d925
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Aug 6 10:03:01 2015 +0300

    If we want this to crash intentionally, use abort() then
    
    free(NULL) does not crash, it is defined to do nothing. Did I not know
    that in 2010?
    
    Change-Id: Ia6c4817ea87b646d643a19daabfe7850c5416cc8

diff --git a/salhelper/source/simplereferenceobject.cxx b/salhelper/source/simplereferenceobject.cxx
index f2ec5a7..95e8b6f 100644
--- a/salhelper/source/simplereferenceobject.cxx
+++ b/salhelper/source/simplereferenceobject.cxx
@@ -62,15 +62,15 @@ void SimpleReferenceObject::operator delete(void * pPtr, std::nothrow_t const &)
 #ifdef _MSC_VER
 
 /* This operator is supposed to be unimplemented, but that now leads
- * to compilation and/or linking errors with MSVC2008. (Don't know
- * about MSVC2010.) As it can be left unimplemented just fine with
- * gcc, presumably it is never called. So do implement it then to
- * avoid the compilation and/or linking errors, but make it crash
- * intentionally if called.
+ * to compilation and/or linking errors with MSVC2008. Problem still
+ * there with MSVC2013. As it can be left unimplemented just fine with
+ * other compilers, presumably it is never called. So do implement it
+ * then to avoid the compilation and/or linking errors, but make it
+ * crash intentionally if called.
  */
 void SimpleReferenceObject::operator delete[](void * /* pPtr */)
 {
-    free(NULL);
+    abort();
 }
 #endif
 


More information about the Libreoffice-commits mailing list