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

00189.c segfault at address 0x10 while tool run #358

Open
IngeniariusSoftware opened this issue Sep 10, 2022 · 0 comments
Open

00189.c segfault at address 0x10 while tool run #358

IngeniariusSoftware opened this issue Sep 10, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@IngeniariusSoftware
Copy link
Member

remove the test from the line if it fixed in the testcuite:
00087, 00088, 00089, 00124, 00159, 00189, 00209, 00210, 00216: TODO segfault at address 0x10 while tool run

tests:
https://github.com/c-testsuite/c-testsuite/blob/master/tests/single-exec/00189.c

#include <stdio.h>

int fred(int p)
{
   printf("yo %d\n", p);
   return 42;
}

int (*f)(int) = &fred;

/* To test what this is supposed to test the destination function
   (fprint here) must not be called directly anywhere in the test.  */
int (*fprintfptr)(FILE *, const char *, ...) = &fprintf;

int main()
{
   fprintfptr(stdout, "%d\n", (*f)(24));

   return 0;
}

/* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/
@IngeniariusSoftware IngeniariusSoftware added the bug Something isn't working label Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants