Hello Nithin,

If you have not already done it, I suggest you take a look at TF-A error handling policy:
https://trustedfirmware-a.readthedocs.io/en/latest/process/coding-guidelines.html#using-assert-to-check-for-programming-errors

This document clarifies what we consider as programming errors. Some might be surprising (e.g. bad argument provided by platform porting function), if you're coming from a different project with a different error handling policy. Programming errors can be safely handled through debug assertions and removed in debug builds.

All other types of errors must be handled with proper runtime tests which are preserved in release builds.

Hope that helps,
Sandrine

From: Nithin S via TF-A <tf-a@lists.trustedfirmware.org>
Sent: 11 October 2023 09:36
To: tf-a@lists.trustedfirmware.org <tf-a@lists.trustedfirmware.org>
Subject: [TF-A] Usage of assert functions in TFA Code
 
Hello,
There are multiple occurrences in TFA Code where assert statements are used to handle function arguments. But these assert statements are currently enabled only in debug mode. So, I wanted to know that will there be any harm in continuing to use assert statements in production code as well for handling failures?

Regards,
Nithin S
--
TF-A mailing list -- tf-a@lists.trustedfirmware.org
To unsubscribe send an email to tf-a-leave@lists.trustedfirmware.org