[Ltrace-devel] [PATCH 4/5] Fix errors in tests

Ivan Zakharyaschev imz at altlinux.org
Thu Nov 23 16:39:17 UTC 2017


Hello!

That's a good fix for the tests, which changes the expected results from 
nonsense to sensible things.

The problem must stem from the fact that on x86_64 the code is optimized 
and doesn't follow the ABI for library-internal function calls (therefore 
ltrace printed nonsense as result, and that was saved into the tests), 
whereas on x86 (32bit) the ABI is followed, but some noise is added by GCC 
into the code (the "thunk" calls; I've just found some explanation for 
what this is at https://ewontfix.com/18/ : "32-bit x86 Position 
Independent Code").

For illustrative purpose (for future developers) I would leave also the 
old code without that workaround against optimization which gives wrong 
ltrace results on x86_64 as "X-Fail" tests (if that is available in 
dejagnu). So that this challenge remains visible to future developers of 
ltrace: librarry-internal calls are quite complicate to trace.

(It's better to post a series of patches as a series of separate messages, 
so that discussion can continue in threads.)

-- 
Best regards,
Ivan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Fix-errors-in-tests.patch
Type: text/x-patch
Size: 3894 bytes
Desc: 
URL: <http://lists.alioth.debian.org/pipermail/ltrace-devel/attachments/20171123/f7f1dfd2/attachment.bin>


More information about the Ltrace-devel mailing list