]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
A service to generate artificialy SIGSEGV to test robustness of high level layers
authorAnthony Geay <anthony.geay@edf.fr>
Fri, 6 Jan 2023 16:59:00 +0000 (17:59 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Fri, 6 Jan 2023 16:59:00 +0000 (17:59 +0100)
src/KernelHelpers/KernelServices.cxx
src/KernelHelpers/KernelServices.hxx
src/KernelHelpers/KernelServices.i

index e2ef5b3a4ccd3c6cf6bca0d2d630d85d21b9b468..3d571e8478b3d6c56a3a9f8672d7a285f2857f6a 100644 (file)
@@ -33,3 +33,12 @@ std::string RetrieveCompoInternal(const std::string& compoName)
     CORBA::String_var ior = orb->object_to_string(obj);
     return std::string(ior.in());
 }
+
+/*!
+ * This method generates a SIGSEGV to test robustness of higher level layers.
+ */
+void GenerateViolentMemoryFaultForTestPurpose()
+{
+    double *a = nullptr;
+    *a = 0;
+}
index f41efaf7301bdc99a770738d20708fd881e99888..9495a8b527a43dd3460fdfc50cedf2b342c884f5 100644 (file)
@@ -22,4 +22,5 @@
 
 void RegisterCompoInternal(const std::string& compoName, const std::string& compoIOR);
 std::string RetrieveCompoInternal(const std::string& compoName);
+void GenerateViolentMemoryFaultForTestPurpose();
 #endif
index bef3f16139c56a46dda0a8e78dfc989023356928..8f148b6cdacf8c5bb899be22957c0f2743ff9b01 100644 (file)
@@ -58,6 +58,7 @@ public:
 {
     void RegisterCompoInternal(const std::string& compoName, const std::string& compoIOR);
     std::string RetrieveCompoInternal(const std::string& compoName);
+    void GenerateViolentMemoryFaultForTestPurpose();
 }
 
 %pythoncode %{