[Ltrace-devel] nested library calls and right-hand params
Petr Machata
pmachata at redhat.com
Tue Nov 9 01:18:16 UTC 2010
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? 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.
Thanks,
PM
More information about the Ltrace-devel
mailing list