[Ltrace-devel] nested library calls and right-hand params

Joe Damato ice799 at gmail.com
Tue Nov 9 02:27:46 UTC 2010


On Mon, Nov 8, 2010 at 5:18 PM, Petr Machata <pmachata at redhat.com> wrote:
> 09.11.2010 01:08, Joe Damato wrote:
>>
>> On Wed, Nov 3, 2010 at 11:00 AM, Petr Machata<pmachata at redhat.com>  wrote:
>>>
>>> 02.11.2010 17:49, Petr Machata wrote:
>>>>
>>>> The problem
>>>> here is that the register set is preserved in struct Process, not in
>>>> struct callstack_element, and so is overwritten when nested call appears
>>>> which has right-hand parameters too.
>>>
>>> This is now fixed here:
>>>  https://github.com/pmachata/ltrace/tree/nested
>>>
>>> That branch forks off this branch:
>>>  https://github.com/pmachata/ltrace/tree/float
>>> which fixes a problem with passing doubles in arguments and return values
>>> on
>>> x86_64, and simplifies the whole argument-preserving scenario a bit.
>>>
>>> Both add test cases for bugs that they fix.
>>
>> I tried these changes on an x86 ubuntu VM and two tests failed:
>>
>> FAIL: func_double(3.40*, -3.40*).*= -3.40* in
>> /home/joe/code/ltrace/testsuite/ltrace.main/parameters.ltrace for 0
>> times ,should be 1
>> FAIL:<... func_call resumed>  \"x\", \"y\") in
>> /home/joe/code/ltrace/testsuite/ltrace.main/parameters.ltrace for 0
>> times ,should be 1
>
> Hmm, these are the new tests.
>
>> The .ltrace output is below.
>> func_double(0.000000, 0.000000)                  = 0.000000
>
>> func_call(<unfinished ...>
>> func_work("x")                                   =<void>
>> <... func_call resumed>  "y", "Z\213\014$\211\004$\213D$\004\302\014")
>> =<void>
>> +++ exited (status 0) +++
>
> Yep, it's broken.  The question is why :)  That's how it looked before I
> fixed it, are you sure that you rebuilt ltrace?

I just did a make clean and a make and reran make check. git log shows
your patches in the tree I am building.

> If yes, can you send me the
> binaries?  That is the files "parameters" and "libparameters.so" from
> testsuite/ltrace.main.  I'll need to look inside.

Both files are attached to this email.

Thanks,
joe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libparameters.so
Type: application/octet-stream
Size: 11841 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/ltrace-devel/attachments/20101108/39b8ff8b/attachment-0001.so>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parameters
Type: application/octet-stream
Size: 9771 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/ltrace-devel/attachments/20101108/39b8ff8b/attachment-0001.obj>


More information about the Ltrace-devel mailing list