Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected output of the generate command #514

Open
b00bl1k opened this issue Jan 11, 2025 · 0 comments
Open

Unexpected output of the generate command #514

b00bl1k opened this issue Jan 11, 2025 · 0 comments

Comments

@b00bl1k
Copy link

b00bl1k commented Jan 11, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant