ALT Linux Bugzilla
– Attachment 1353 Details for
Bug 8928
Падения при использовании O1 на x86_64 (dlsym)
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
test-o2-x86_64.c
test-o2-x86_64.c (text/plain), 860 bytes, created by
Anton Farygin
on 2006-01-25 13:20:58 MSK
(
hide
)
Description:
test-o2-x86_64.c
Filename:
MIME Type:
Creator:
Anton Farygin
Created:
2006-01-25 13:20:58 MSK
Size:
860 bytes
patch
obsolete
> >#define _GNU_SOURCE >//#define __BSD_VISIBLE > >#include <sys/types.h> >#include <sys/stat.h> >#include <fcntl.h> >#include <dlfcn.h> >#include <stdio.h> >#include <unistd.h> > > >#define LIBCPATH "/lib64/libc.so.6" > > >int (*next_open64)(const char *pathname, int flags, mode_t mode) = NULL; > >int main(void) >{ > char *msg; > int fd; > next_open64=dlvsym(RTLD_NEXT, "open64","GLIBC_2.2.5"); > fprintf(stderr,"dlvsym(open64): %p\n",*(next_open64)); > if ( (msg = dlerror()) != NULL) > fprintf (stderr, "dlvsym(%s): %s\n", "open64", msg); > fd = next_open64("/etc/inittab", O_RDONLY, 0); > close(fd); > next_open64=dlsym(RTLD_NEXT, "open64"); > if ( (msg = dlerror()) != NULL) > fprintf (stderr, "dlsym(%s): %s\n", "open64", msg); > fprintf(stderr,"dlsym(open64): %p\n",*(next_open64)); > fd = next_open64("/etc/inittab", O_RDONLY, 0); > 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