Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 149248 Details for
Bug 230850
/proc/PID/mem is not readable
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
test case
vdso-test.c (text/plain), 2.28 KB, created by
Roland McGrath
on 2007-03-05 08:16:06 UTC
(
hide
)
Description:
test case
Filename:
MIME Type:
Creator:
Roland McGrath
Created:
2007-03-05 08:16:06 UTC
Size:
2.28 KB
patch
obsolete
> >#include <config.h> >#include <stdio.h> >#include <stdio_ext.h> >#include <inttypes.h> >#include <locale.h> >#include <stdlib.h> >#include <string.h> >#include <errno.h> >#include <error.h> >#include <unistd.h> >#include <signal.h> >#include <sys/wait.h> >#include <sys/ptrace.h> >#include ELFUTILS_HEADER(dwfl) > >static int >check_module (Dwfl_Module *mod, > void **userdata __attribute__ ((unused)), > const char *name, Dwarf_Addr base __attribute__ ((unused)), > void *arg __attribute__ ((unused))) >{ > if (strncmp (name, "[vdso: ", sizeof "[vdso: " - 1)) > return DWARF_CB_OK; > > int n = dwfl_module_getsymtab (mod); > if (n < 0) > error (2, 0, "dwfl_module_getsymtab: %s", dwfl_errmsg (-1)); > > for (int i = 0; i < n; ++i) > { > GElf_Sym sym; > const char *name = dwfl_module_getsym (mod, i, &sym, NULL); > printf ("%#" PRIx64 " %s\n", sym.st_value, name); > } > > exit (0); >} > >int >main (int argc, char **argv) >{ > /* We use no threads here which can interfere with handling a stream. */ > (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER); > > /* Set locale. */ > (void) setlocale (LC_ALL, ""); > > pid_t ppid = getpid (); > pid_t pid = fork (); > if (pid < 0) > error (2, errno, "fork"); > > if (pid == 0) > { > if (argc > 1 && !strcmp (argv[1], "ptrace")) > ptrace (PTRACE_TRACEME); > raise (SIGSTOP); > > do > sleep (1); > while (kill (ppid, 0) == 0); > _exit (0); > } > > int status; > if (waitpid (pid, &status, WUNTRACED) != pid) > error (2, errno, "waitpid (child %d)", pid); > > static const Dwfl_Callbacks proc_callbacks = > { > .find_debuginfo = dwfl_standard_find_debuginfo, > .find_elf = dwfl_linux_proc_find_elf, > }; > Dwfl *dwfl = dwfl_begin (&proc_callbacks); > if (dwfl == NULL) > error (2, 0, "dwfl_begin: %s", dwfl_errmsg (-1)); > > int result = dwfl_linux_proc_report (dwfl, pid); > if (result < 0) > error (2, 0, "dwfl_linux_proc_report: %s", dwfl_errmsg (-1)); > else if (result > 0) > error (2, result, "dwfl_linux_proc_report"); > > if (dwfl_report_end (dwfl, NULL, NULL) != 0) > error (2, 0, "dwfl_report_end: %s", dwfl_errmsg (-1)); > > ptrdiff_t p = 0; > do > p = dwfl_getmodules (dwfl, &check_module, NULL, p); > while (p > 0); > if (p < 0) > error (2, 0, "dwfl_getmodules: %s", dwfl_errmsg (-1)); > > dwfl_end (dwfl); > > return 1; >}
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 230850
:
149185
|
149186
| 149248 |
149350