[Libreoffice-commits] online.git: ios/Mobile
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Wed Oct 9 11:31:34 UTC 2019
ios/Mobile/AppDelegate.mm | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 39ddc5242d9378566626d9c3a73e9fda91d1129a
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Oct 9 14:21:48 2019 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Wed Oct 9 14:30:20 2019 +0300
tdf#126974: When we are about to be killed, just exit bluntly
Letting the system call exit() will cause destructors of global C++
objects to be called, and doing that at an arbitrary point in time
will cause a crash. So just call std::_Exit() in the AppDelegate's
applicationWillTerminate: method.
Change-Id: I15d7a761db931a6b7aed588bb407fa0d3b4a9465
(cherry picked from commit 4c2cb838ff5fa2485ec74db11e239883a53f7ff9)
diff --git a/ios/Mobile/AppDelegate.mm b/ios/Mobile/AppDelegate.mm
index 227c895eb..8b9badcc7 100644
--- a/ios/Mobile/AppDelegate.mm
+++ b/ios/Mobile/AppDelegate.mm
@@ -271,6 +271,9 @@ static void updateTemplates(NSData *data, NSURLResponse *response)
}
- (void)applicationWillTerminate:(UIApplication *)application {
+ // tdf#126974 We don't want any global object destructors to be called, the code
+ // is not prepared for that.
+ std::_Exit(1);
}
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)inputURL options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options {
More information about the Libreoffice-commits
mailing list