[Libreoffice-commits] core.git: sal/osl

Stephan Bergmann sbergman at redhat.com
Fri Jun 17 12:37:48 UTC 2016


 sal/osl/w32/salinit.cxx |   28 ----------------------------
 1 file changed, 28 deletions(-)

New commits:
commit e30f3bcd25762236eb739584dc71691123527c9f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Jun 17 10:56:24 2016 +0200

    Revert "fdo#38913: Prevent invalid parameter handler crashes"
    
    This reverts commit a82e532ce006c54b2740de74d1da5d11307da7c1.  That hack should
    no longer be necessary now that the root cause for tdf#38913 has probably been
    found and fixed with b5876bfcb69a65c87d602bae687b3c0634c0a1e7 "passing a NULL
    pointer to fileno is not allowed".
    
    Conflicts:
    	sal/osl/w32/salinit.cxx
    
    Change-Id: Id3a3d3163945acc9b5d5e74a8d357dfa2ce63f37
    Reviewed-on: https://gerrit.libreoffice.org/26411
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sal/osl/w32/salinit.cxx b/sal/osl/w32/salinit.cxx
index 04fab27..afa63de 100644
--- a/sal/osl/w32/salinit.cxx
+++ b/sal/osl/w32/salinit.cxx
@@ -19,9 +19,6 @@
 
 #include "sal/config.h"
 
-#include <iostream>
-#include <stdlib.h>
-
 #include "system.h"
 #include <osl/process.h>
 #include <sal/main.h>
@@ -34,23 +31,6 @@ extern "C" {
 //From time.c
 void sal_initGlobalTimer();
 
-// _set_invalid_parameter_handler appears unavailable with MinGW:
-#if defined _MSC_VER
-namespace {
-
-extern "C" void invalidParameterHandler(
-    wchar_t const * expression, wchar_t const * function, wchar_t const * file,
-    unsigned int line, SAL_UNUSED_PARAMETER uintptr_t)
-{
-    std::wcerr
-        << L"Invalid parameter in \"" << (expression ? expression : L"???")
-        << L"\" (" << (function ? function : L"???") << ") at "
-        << (file ? file : L"???") << L':' << line << std::endl;
-}
-
-}
-#endif
-
 // Prototypes for initialization and deinitialization of SAL library
 
 void sal_detail_initialize(int argc, char ** argv)
@@ -103,14 +83,6 @@ void sal_detail_initialize(int argc, char ** argv)
         // How to handle a very unlikely error ???
     }
 
-#if defined _MSC_VER // appears unavailable with MinGW
-    // It appears that at least some jvm.dll versions can cause calls to
-    // _fileno(NULL), which leads to a call of the invalid parameter handler,
-    // and the default handler causes the application to crash, so install a
-    // "harmless" one (cf. fdo#38913):
-    _set_invalid_parameter_handler(&invalidParameterHandler);
-#endif
-
     osl_setCommandArgs(argc, argv);
 }
 


More information about the Libreoffice-commits mailing list