Blame SOURCES/rhbz1643997.0010-bpf-translate.cxx-plug-an-exception-gap-in-is_numeri.patch

583230
From baabce812704826c5f7b20ed4afcca816cab7967 Mon Sep 17 00:00:00 2001
583230
From: Serhei Makarov <smakarov@redhat.com>
583230
Date: Thu, 25 Oct 2018 12:19:53 -0400
583230
Subject: [PATCH 10/32] bpf-translate.cxx :: plug an exception gap in
583230
 is_numeric()
583230
583230
---
583230
 bpf-translate.cxx | 8 ++++++--
583230
 1 file changed, 6 insertions(+), 2 deletions(-)
583230
583230
diff --git a/bpf-translate.cxx b/bpf-translate.cxx
583230
index df22401ad..bf55c56b4 100644
583230
--- a/bpf-translate.cxx
583230
+++ b/bpf-translate.cxx
583230
@@ -681,11 +681,15 @@ is_numeric (const std::string &str)
583230
   size_t pos = 0;
583230
   try {
583230
     stol(str, &pos, 0);
583230
-  } catch (std::invalid_argument &e) {
583230
+  } catch (const std::invalid_argument &e) {
583230
     return false;
583230
-  } catch (std::out_of_range &e) {
583230
+  } catch (const std::out_of_range &e) {
583230
     /* XXX: probably numeric but not valid; give up */
583230
     return false;
583230
+  } catch (...) {
583230
+    /* XXX: handle other errors the same way */
583230
+    std::cerr << "BUG: bpf assembler -- is_numeric() saw unexpected exception" << std::endl;
583230
+    return false;
583230
   }
583230
   return (pos == str.size());
583230
 }
583230
-- 
583230
2.14.5
583230