KhronosGroup / KSCAF_DocRequirements

Khronos Safety Critical Advisory Forum’s minimum requirements for developing a safety critical technology specification.
3 stars 1 forks source link

No undefined behavior (Bug 15988) #7

Closed DeOrellana closed 7 years ago

DeOrellana commented 7 years ago

Erik Noreke 2016-08-30 00:49:41 PDT

All behavior must be defined. If not defined it must be stated that the behavior is implementation specific. The word "Undefined" is not to be used.

Comment 1 Erik Noreke 2016-09-12 07:44:35 PDT

Assigned per WG call 2016-09-12

Comment 2 Erik Noreke 2016-09-20 13:07:30 PDT

Setting QA contact to non-member SCAP mailing list.

Comment 3 Erik Noreke 2016-10-03 07:13:25 PDT

Assigning to Illya per call 20161003

Comment 4 illya@codeplay.com 2016-10-10 03:40:15 PDT

Undefined Behaviour

Generally undefined behaviour is software that does not behave as expected, fails under certain conditions or does not handle error conditions appropriately are a result of defects in the code.

From the point of view of an SC API and its usage by a client the implementation should not be allowed to entered a state in which the client cannot regain control and control the outcome. The implementation will always return control and provide a status for all operational cases.

Undefined behaviour with regards to a compiler and the resulting code it produces due to rules should not be confused with the specified functionality and status of an API function (though equally important).

Comment 5 illya@codeplay.com 2016-11-15 03:55:35 PST

Related 16059

The definition of undefined behaviour (comment 4). Is this exceptable?

irudkin commented 7 years ago

Related to Guideline issue Non recoverable error conditions and reporting implementation status #16

shadazar commented 7 years ago

I would say another definition of the use of "undefined" is where the specification does not define the behavior and leaves it up to the implementation.

Also is this where we should talk about how the standard defines what happens when out of bounds parameters are passed to functions. In DO-178 the term robustness is used to define the handling of invalid parameters.

shadazar commented 7 years ago

This issue has text in the document, closing the issue.