From 32881f01833dbcefd5600e1135dd8743178bfd96 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Fri, 12 Aug 2016 16:53:48 +0300 Subject: tdf#100965: Restart on initialisation-time OpenCL crash Add a flag to the OpenCLZone indicating whether we are performing the first-start OpenCL functionality verification, so that if we run into a crash that is caught by the VCL VCLExceptionSignal_impl() handler, we terminate the process with the EXITHELPER_NORMAL_RESTART status after first having disabled OpenCL use. The wrapper process will then restart soffice.bin. This is for Windows only so far. This matches what we do if OpenGL fails early during start of LibreOffice. Change-Id: Ibb9bf3a86b7521bf16728de2a118ad4323be674b Reviewed-on: https://gerrit.libreoffice.org/28086 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist --- opencl/source/OpenCLZone.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'opencl') diff --git a/opencl/source/OpenCLZone.cxx b/opencl/source/OpenCLZone.cxx index 03521a29c66f..52d6ada8518a 100644 --- a/opencl/source/OpenCLZone.cxx +++ b/opencl/source/OpenCLZone.cxx @@ -21,6 +21,7 @@ sal_uInt64 volatile OpenCLZone::gnEnterCount = 0; sal_uInt64 volatile OpenCLZone::gnLeaveCount = 0; +bool volatile OpenCLZone::gbInInitialTest = false; /** * Called from a signal handler if we get @@ -47,4 +48,9 @@ void OpenCLZone::hardDisable() } } +void OpenCLZone::enterInitialTest() +{ + gbInInitialTest = true; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit