Skip to content

longjmp in abstract call graph/ARG #1711

Open
@sim642

Description

@sim642

The termination analysis uses an abstract call graph to detect cycles from recursion. As far as I know, this graph does not contain edges corresponding to longjmp flows. Instead, the termination analysis gives up on any longjmp and considers the program as possibly non-terminating.

I wonder if it would be possible to have longjmp-aware termination analysis if the abstract call graph also indicated these flows in some way.
It's possible to have longjmp-based loops, but these are artificially constructed examples. I imagine realistic longjmp usage wouldn't do such things.

Even if this isn't enough to improve termination analysis, these flows could still make sense for some usability things. The (abstract) call graph reflects what calls what and conversely normal returns. In that sense it would make sense to also indicate the abnormal returns via longjmp.

(It would be even better to have them in the ARG for abstract debugging but that might not be so simple because both longjmp and ARG construction are separate Spec lifters.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions