diff options
Diffstat (limited to '')
| -rw-r--r-- | src/regress/lib/libc/atexit/atexit_test.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/regress/lib/libc/atexit/atexit_test.c b/src/regress/lib/libc/atexit/atexit_test.c index 3dd0b62c3e..f374dee9eb 100644 --- a/src/regress/lib/libc/atexit/atexit_test.c +++ b/src/regress/lib/libc/atexit/atexit_test.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: atexit_test.c,v 1.6 2007/09/03 14:42:44 millert Exp $ */ | 1 | /* $OpenBSD: atexit_test.c,v 1.7 2014/06/18 19:01:10 kettenis Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * Copyright (c) 2002 Daniel Hartmeier | 4 | * Copyright (c) 2002 Daniel Hartmeier |
| @@ -43,7 +43,7 @@ | |||
| 43 | void handle_first(void); | 43 | void handle_first(void); |
| 44 | void handle_middle(void); | 44 | void handle_middle(void); |
| 45 | void handle_last(void); | 45 | void handle_last(void); |
| 46 | void handle_invalid(void); | 46 | void handle_invalid(void *); |
| 47 | void handle_cleanup(void); | 47 | void handle_cleanup(void); |
| 48 | void handle_signal(int); | 48 | void handle_signal(int); |
| 49 | 49 | ||
| @@ -79,7 +79,7 @@ main(int argc, char *argv[]) | |||
| 79 | /* this is supposed to segfault */ | 79 | /* this is supposed to segfault */ |
| 80 | if (!strcmp(argv[1], "-invalid-atexit")) { | 80 | if (!strcmp(argv[1], "-invalid-atexit")) { |
| 81 | signal(SIGSEGV, handle_signal); | 81 | signal(SIGSEGV, handle_signal); |
| 82 | __atexit->fns[0].fn_ptr.std_func = handle_invalid; | 82 | __atexit->fns[0].fn_ptr = handle_invalid; |
| 83 | } else if (!strcmp(argv[1], "-invalid-cleanup")) { | 83 | } else if (!strcmp(argv[1], "-invalid-cleanup")) { |
| 84 | struct atexit *p = __atexit; | 84 | struct atexit *p = __atexit; |
| 85 | 85 | ||
| @@ -88,7 +88,7 @@ main(int argc, char *argv[]) | |||
| 88 | p = p->next; | 88 | p = p->next; |
| 89 | if (p == NULL) | 89 | if (p == NULL) |
| 90 | fprintf(stderr, "p == NULL, no page found\n"); | 90 | fprintf(stderr, "p == NULL, no page found\n"); |
| 91 | p->fns[0].fn_ptr.std_func = handle_invalid; | 91 | p->fns[0].fn_ptr = handle_invalid; |
| 92 | } | 92 | } |
| 93 | __atexit_register_cleanup(handle_cleanup); | 93 | __atexit_register_cleanup(handle_cleanup); |
| 94 | counter = 0; | 94 | counter = 0; |
| @@ -121,7 +121,7 @@ handle_cleanup(void) | |||
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | void | 123 | void |
| 124 | handle_invalid(void) | 124 | handle_invalid(void *arg) |
| 125 | { | 125 | { |
| 126 | fprintf(stderr, "handle_invalid() THIS SHOULD HAVE SEGFAULTED INSTEAD!\n"); | 126 | fprintf(stderr, "handle_invalid() THIS SHOULD HAVE SEGFAULTED INSTEAD!\n"); |
| 127 | } | 127 | } |
