https://bugs.kde.org/show_bug.cgi?id=369175

Carl Love <c...@us.ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |c...@us.ibm.com,
                   |                            |will_schm...@vnet.ibm.com
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |CONFIRMED

--- Comment #2 from Carl Love <c...@us.ibm.com> ---
I have some what isolated where the issue when running on Power 7 BE (issue
does not occur on LE) is but at this point could use some help getting to the
root cause.  

in VEX/priv/guest_ppc_toIR.c in the function dis_av_bcd() there is a case
statement that handles the bcdadd and bcdsub instructions.  Once the result of
the operation is completed, we have to compute some values to set the CR field
6.  The calculation of the valid bit is as follows:

valid =
            unop( Iop_64to32,
                  binop( Iop_And64,
                         is_BCDstring128( /* Signed */True, mkexpr( vA ) ),
                         is_BCDstring128( /* Signed */True, mkexpr( vB ) ) ) );

Note,  is_BCDstring128() calls a clean helper written in C.   The issue is
making the two calls above leads to a segmentation fault.  I rewrote the
computation as follows to isolate out the
computations:

          assign( A_isBCDstr, is_BCDstring128( /* Signed */True, mkexpr( vA ) )
);
         //      assign( A_isBCDstr, mkU64( 0 ) );                              
         assign( B_isBCDstr, is_BCDstring128( /* Signed */True, mkexpr( vB ) )
);
         //      assign( B_isBCDstr, mkU64( 0 ) );                              

         valid = unop( Iop_64to32, binop( Iop_And64, mkexpr( A_isBCDstr ),
mkexpr( B_isBCDstr ) ) );
Now if I make the call to is_BCDstring128() for vA and vB I get the
segmentation fault.  If I comment out either computation and put in the
appropriate commented out line to just explicitly set the result to zero, I do
not get a segmentation fault.  The segmentation fault occurs later when the IR
code is actually executed.  I am guessing that somehow the generation of the IR
code with two back to back clean helper calls results in bad code that causes
the segmentation fault.  Unfortunately, the issue is a bit deeper in Valgrind
then I am familiar with.  I am looking for help to debug this issue.  Please
let me know if there is a way we can dump out the generated code and so we can
examine it.  Thanks.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to