Skip to content

goto-instrument --dump-c produces incorrect results if the code has been unwound or inlined #226

Open
@martin-cs

Description

@martin-cs

The following sequence is needed to reproduce the bug:

goto-cc original.c -o original.goto
goto-instrument --unwind 4 original.goto original-unwound.goto
goto-instrument --dump-c original-unwound.goto

In the case of unwinding, dump-c produces multiple copies of variable definitions and does not correctly translate the later loop bodies (omitting function calls). If --inline is used instead of --unwind the result doesn't appear to be valid C.

I have full example code if anyone wants a go at fixing this but because github sucks I can't actually attach it to this bug report.

@tautschnig

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions