Skip to content

Extend safety to include portability issues #102

Open

Description

@r-ross

The tutorial associates safety with not having C undefined behaviours, but consider extending that to other portability issues as described in ISO/IEC 9899:1999 Annex J. For example, a program relying on the values of padding bytes is relying on unspecified behavior instead of undefined behavior but is not really safe. Some of the listed portability issues would be very difficult to check so no one should expect completeness, but finding as many as reasonably possible can help avoid scenarios where "it works for me" and "it works for the rest of the team" yet "it blows up in the customer's face."

Activity

  1. dc-mak commented on Dec 27, 2024

    @dc-mak
    Collaborator

    Is this an issue for the tutorial wording, or for CN as a proof tool? Because CN does tend to take a conservative stance to such issues, or make it explicit (for example, endianness).

  2. r-ross commented on Jan 3, 2025

    @r-ross
    Author

    Tutorial wording based on what CN is intended to check in the absence of user-defined specs. For example, integer overflows are reported since they are undefined behavior according to C standards, but what other portability issues are expected to be covered?

  3. dc-mak commented on Jan 4, 2025

    @dc-mak
    Collaborator

    CN is an academic research project under active development, with limited resources. We aim to be about as comprehensive as the underlying Cerberus frontend (https://www.repository.cam.ac.uk/handle/1810/350157) but do not currently maintain a list of which portability issues we cover, and how. If you are interested in this information, and are willing to compile it, then we can point you in the right direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions