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

printf frigg assertion failure #1100

Closed
Dennisbonke opened this issue Aug 2, 2024 · 1 comment · Fixed by managarm/frigg#77
Closed

printf frigg assertion failure #1100

Dennisbonke opened this issue Aug 2, 2024 · 1 comment · Fixed by managarm/frigg#77
Labels
bug This issue reports a bug

Comments

@Dennisbonke
Copy link
Member

While trying to configure coreutils, in the checking whether printf supports POSIX/XSI format strings with positions check, the following assertion is tripped: include/frg/printf.hpp:65: Assertion 'opts->arg_pos <= vsp->num_args' failed!
The code it's trying to execute is as follows:

/* The string "%2$d %1$d", with dollar characters protected from the shell's
   dollar expansion (possibly an autoconf bug).  */
static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
static char buf[100];
int main ()
{
  sprintf (buf, format, 33, 55);
  return (strcmp (buf, "55 33") != 0);
}
@Dennisbonke Dennisbonke added the bug This issue reports a bug label Aug 2, 2024
@Dennisbonke Dennisbonke moved this to To do for proper self-hosting (including image generation) in Self-hosting Aug 2, 2024
@Dennisbonke
Copy link
Member Author

@48cf This issue also prevents systemctl --help from working (probably, same assertion is triggered on a format string with the dollar sign memes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue reports a bug
Projects
Status: To do for proper self-hosting (including image generation)
Development

Successfully merging a pull request may close this issue.

1 participant