This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/13283] script -> C translator incorrect comparison (using ==) of kernel_string() operands
- From: "jistone at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Wed, 12 Oct 2011 17:27:44 +0000
- Subject: [Bug translator/13283] script -> C translator incorrect comparison (using ==) of kernel_string() operands
- Auto-submitted: auto-generated
- References: <bug-13283-6586@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=13283
Josh Stone <jistone at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jistone at redhat dot com
--- Comment #2 from Josh Stone <jistone at redhat dot com> 2011-10-12 17:27:44 UTC ---
The generated code does look suspect to me.
(In reply to comment #0)
> (void)
> ({
> l->__tmp0 = (((
> ({ [...]
> c->locals[c->nesting+1].function_kernel_char.__retvalue;
> })) == (
> ({ [...]
> c->locals[c->nesting+1].function_kernel_char.__retvalue;
> }))));
> _stp_printf ("Equal? %llX\n", l->__tmp0);
> ((int64_t)0LL);
> });
The left and right sides of the '==' are both expr-statements with the same
__retvalue. We ought to using a tmp value for both to avoid this issue.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.