Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • lfortran lfortran
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 395
    • Issues 395
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 72
    • Merge requests 72
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Scheduled maintenance on the database layer will take place on 2022-07-02. We expect GitLab.com to be unavailable for up to 2 hours starting from 06:00 UTC. Kindly follow our status page for updates and read more in our blog post.

  • lfortran
  • lfortranlfortran
  • Issues
  • #369
Closed
Open
Created Jun 22, 2021 by Ondřej Čertík@certikOwner

Safe mode

We should have a "safe mode" (perhaps on by default in Debug mode) where a Fortran code cannot segfault at runtime no matter how it is written. To do so, we have to implement the following runtime checks:

  • Array bounds checking (#367)
  • Accessing unallocated variable (#370)
  • Dangling pointers checks (#366)
  • Infinite recursion checks (#368)
  • Numerical errors / exceptions checks (#371)
  • Out of memory (#372)
  • Accessing an OPTIONAL argument that is not PRESENT
  • Opening a file for reading that does not exist
  • Reading a variable from a line of a file that has data of the wrong type
  • Reading N elements of an array from a character string that contains fewer than N values
  • An invalid format string (for example with missing parenthesis) or a format string that does not match the data read or written. When the data consists of scalars, maybe the compatibility of the data and format string can be checked at compile time.
  • Allocating an array that is already allocated, or deallocating an array that is not allocated

If there is any other way a Fortran code could segfault, we should add it to the above list and check it at runtime.

Edited Aug 16, 2021 by Ondřej Čertík
Assignee
Assign to
Time tracking