From 14369c1c3c8231e7b09b60493f2ad5047f39053c Mon Sep 17 00:00:00 2001 From: David Steele Date: Fri, 8 May 2020 15:36:20 -0400 Subject: [PATCH] Mark variables modified in TRY block as volatile. It's important that the values in these variables are maintained even after an exception is thrown, so they must be marked volatile. Found while testing on the ppc64le architecture. --- src/info/info.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/info/info.c b/src/info/info.c index ef3dddb7b..e2130f3df 100644 --- a/src/info/info.c +++ b/src/info/info.c @@ -503,8 +503,8 @@ infoLoad(const String *error, InfoLoadCallback *callbackFunction, void *callback MEM_CONTEXT_TEMP_BEGIN() { unsigned int try = 0; - bool done = false; - bool loaded = false; + volatile bool done = false; // Are all files tried? Must be preserved even on error. + volatile bool loaded = false; // Was a file loaded? Must be preserved even on error. const ErrorType *loadErrorType = NULL; String *loadErrorMessage = NULL;