[Bug runtime/29076] user_string_quoted() doesn't properly generate strings in .rodata on x86_64 machines
wcohen at redhat dot com
sourceware-bugzilla@sourceware.org
Wed Apr 20 17:37:43 GMT 2022
https://sourceware.org/bugzilla/show_bug.cgi?id=29076
--- Comment #3 from William Cohen <wcohen at redhat dot com> ---
That appears to be the case on x86_64. The question is how to get the syscall
tests to work better. Have two examples that only differ with where the strcpy
is done. One result has a pointer and the other prints the string:
[wcohen@fedora x86_ro_string]$ cat acct4.c
#include <unistd.h>
#include <string.h>
char *a="foobar";
char buffer[32];
int main()
{
acct(a);
strcpy (&buffer[0], a);
acct(&buffer[0]);
acct((char *)-1);
return 0;
}
[wcohen@fedora x86_ro_string]$ gcc -o acct5 -O2 acct5.c
[wcohen@fedora x86_ro_string]$ sudo stap -c ./acct4 sys_acct.stp
[sudo] password for wcohen:
kprobe.function("__x64_sys_acct")?(0x402010)
kprobe.function("__x64_sys_acct")?("foobar")
kprobe.function("__x64_sys_acct")?(0xffffffffffffffff)
[wcohen@fedora x86_ro_string]$ cat acct5.c
#include <unistd.h>
#include <string.h>
char *a="foobar";
char buffer[32];
int main()
{
strcpy (&buffer[0], a);
acct(a);
acct(&buffer[0]);
acct((char *)-1);
return 0;
}
[wcohen@fedora x86_ro_string]$ gcc -o acct5 -O2 acct5.c
[wcohen@fedora x86_ro_string]$ sudo stap -c ./acct5 sys_acct.stp
kprobe.function("__x64_sys_acct")?("foobar")
kprobe.function("__x64_sys_acct")?("foobar")
kprobe.function("__x64_sys_acct")?(0xffffffffffffffff)
[wcohen@fedora x86_ro_string]$
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Systemtap
mailing list