diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-12-06 08:59:06 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-12-06 14:11:56 +0100 |
commit | cd83f520c4412d86c1bd63f12d56fb0d1158d04e (patch) | |
tree | a046de319d77837f88c396ec3f98fa29a13798c9 /sax | |
parent | 7ae13834fb2e79fdb1547bbd20e9bf9edba6becd (diff) |
tdf#129136 Call _wgetdcwd with "harmless" invalid parameter handler
The documentation of _getdcwd/_wgetdcwd specifies: "If the specified drive
isn't available, or the kind of drive (for example, removable, fixed, CD-ROM,
RAM disk, or network drive) can't be determined, the invalid-parameter handler
is invoked." (<https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/
getdcwd-wgetdcwd?view=vs-2017>) The default handler terminates the process, so
temporarily install a "harmless" one.
(e30f3bcd25762236eb739584dc71691123527c9f "Revert 'fdo#38913: Prevent invalid
parameter handler crashes'" had removed a global "harmless" handler installed
with _set_invalid_parameter_handler to handle JVM-related issues, but which was
then considered no longer necessary. I assume that for those JVM-related issues
there was no obvious place where to install a temporary
_set_thread_local_invalid_parameter_handler, and that that was the reason for
the global _set_invalid_parameter_handler in sal_detail_initialize. I cannot
find any information that _set_thread_local_invalid_parameter_handler would be
available in fewer versions of Windows than _set_invalid_parameter_handler, and
might even be missing on Windows versions that we target.)
(It appears that at least when building with MSVC 2019 and running on Windows 8,
with an --enable-dbgutil build (presumably due to MSVC_USE_DEBUG_RUNTIME) a
"Microsoft Visual C++ Runtime Library: Debug Assertion Failed!" error dialog
still pops up, which needs to be quit with "Ignore" before our
invalidParameterHandler is called.)
Change-Id: I983d622eb03549873a63305f51bf0869d7fea33a
Reviewed-on: https://gerrit.libreoffice.org/84597
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit 9235990b4eacbc8a90750da8bdf2fb15f99a9d79)
Reviewed-on: https://gerrit.libreoffice.org/84612
Diffstat (limited to 'sax')
0 files changed, 0 insertions, 0 deletions