Skip to content

Unexpected output of the generate command #514

@b00bl1k

Description

@b00bl1k

I use tup for building the kolibrios project, which has quite a large build configuration. Recently, I encountered an issue with the generate command: it outputs a sequence of random bytes instead of the expected build command.

I investigated the problem and managed to identify the source of the issue. In the function tuplua_function_definerule, the variable r.command initially contains the correct command. However, the contents of this variable become corrupted after a call to the parse_dependent_tupfiles function. Using gdb, I set a data breakpoint on the r.command content and discovered that the corruption occurs during memory deallocation in the l_alloc function. My assumption is that the garbage collector might be destroying the command table, but I am unsure if this behavior is correct.

I tried tup 0.8 and git versions. Here is the full backtrace: tup-backtrace.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions