How to trace root cause of 15-5-3 - The terminate() function shall not be called implicitly

6 vues (au cours des 30 derniers jours)
I am running Polyspace Bug Finder R2019a.
When checking my program for MISRA violations i get 15-5-3 reported.
I cannot the root cause that trig this violation.
I do have try catch at the outer level of the main() function as described in the MISRA documentation. Can it be issues in a header file that can trig this?
Is it possible to get more information from the program that can point in the right direction?
Any help appreciated.
  1 commentaire
Jalaj Gambhir
Jalaj Gambhir le 28 Août 2019
Hi,
You can have a look here which documents the reason for this particular error.
If possible, can you share the code so that I can look into it, that would be helpful in finding out the bug.

Connectez-vous pour commenter.

Réponses (1)

Steffen Dalgard
Steffen Dalgard le 28 Août 2019
This case is now reported as Reference Case ID (Do not delete): 03755695
Example that fails:
int main()
{
int res_val = 0; // Assume success
try
{
// Do something ...
}
catch (...) // Catch-all handler
{
res_val = 1; // Report error at termination
}
return res_val;
}
  1 commentaire
Jalaj Gambhir
Jalaj Gambhir le 29 Août 2019
Hi,
I have heard that this issue is known and the concerned parties may be investigating further.

Connectez-vous pour commenter.

Produits


Version

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by