ALT Linux Bugzilla
– Attachment 1355 Details for
Bug 8928
Падения при использовании O1 на x86_64 (dlsym)
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
dltest.c
dltest.c (text/plain), 637 bytes, created by
Dmitry V. Levin
on 2006-01-26 14:48:02 MSK
(
hide
)
Description:
dltest.c
Filename:
MIME Type:
Creator:
Dmitry V. Levin
Created:
2006-01-26 14:48:02 MSK
Size:
637 bytes
patch
obsolete
>#define _GNU_SOURCE > >#include <stdio.h> >#include <stdlib.h> >#include <unistd.h> >#include <fcntl.h> >#include <dlfcn.h> > >static void *load_sym(const char *name) >{ > void *addr; > const char *msg; > > (void) dlerror(); > addr = dlsym(RTLD_NEXT, name); > if ((msg = dlerror())) > { > fprintf(stderr, "dlsym(%s): %s\n", name, msg); > abort(); > } > fprintf(stderr, "dlsym(%s) = %p\n", name, addr); > return addr; >} > >int (*next)(const char *pathname, int flags, mode_t mode) = NULL; > >int >main(int ac, const char **av) >{ > int fd; > > if (ac != 2) > return 1; > > next = load_sym(av[1]); > fd = next("/etc/inittab", O_RDONLY, 0); > close(fd); > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 8928
:
1353
| 1355