This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/13283] script -> C translator incorrect comparison (using ==) of kernel_string() operands


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]