John, Xiaozhu, I tested your patch to get malloc to work on Ubuntu 16.04 with both the maxarg example and a more complex program: both work like a charm with your updates!
Big thanks, Martijn On Tue, Jul 26, 2016 at 7:16 PM, Martijn <mart...@martijnrutten.com> wrote: > Great. I'll have a try and report back, hopefully tomorrow. > > Thanks for the quick response, > Martijn > > On Jul 26, 2016 17:12, "John Detter" <jdet...@wisc.edu> wrote: > >> Martijn, >> >> Your issue was fixed by Xiaozhu. You should be able to get the latest >> build from the master branch on our Github page, which includes the jump >> table parsing fix. >> >> Let us know if it works for you, >> >> -- John >> >> On 7/21/2016 10:58 AM, Martijn wrote: >> >> Cool! Thanks for looking into this. >> >> I'll post another question on the mailing list regarding oneTimeCode in >> an exitCallback not working... >> >> One minor in the latest manual, not sure if you are responsible for that: >> endInsertionSet should be finalizeInsertionSet in the text about this if I >> understand correctly. >> >> Cheers, >> Martijn >> >> On Jul 21, 2016 17:38, "John Detter" <jdet...@wisc.edu> wrote: >> >>> Martijn, >>> >>> It looks like it's a jump table issue that is specific to the lib.so.6 >>> that is shipped on Ubuntu. We have someone looking at it that knows how to >>> fix jump table issues so we should have it figured out pretty soon. >>> >>> If you would like to follow our progress, we have a thread on Github: >>> >>> https://github.com/dyninst/dyninst/issues/126 >>> >>> I will send another reminder to the developer and I will let you know >>> when the issue is fixed. >>> >>> In the mean time, if there's anything else that comes up let me know, >>> >>> -- John >>> >>> On 7/21/2016 4:00 AM, Martijn wrote: >>> >>> Hi John, >>> >>> Did you manage to reproduce the issue? anything I can do to help to nail >>> this? >>> >>> Thanks. Best regards, >>> Martijn >>> >>> On Mon, Jul 18, 2016 at 6:09 PM, John Detter <jdet...@wisc.edu> wrote: >>> >>>> Martijn, >>>> >>>> What are you using as your mutatee? e.g. what is the command you're >>>> using to run the tutorial? >>>> >>>> -- John >>>> >>>> On 7/18/2016 8:50 AM, Martijn wrote: >>>> >>>> Hello, >>>> >>>> I am looking at the DynInst API to instrument applications to detect >>>> memory errors. Very impressed with the platform independence of the API >>>> thus far. >>>> >>>> Studying the maxarg.C tutorial code on http://www.paradyn.org/tutorial/ >>>> with DynInst 9.2.0 on Ubuntu 16.04 Desktop and gcc 5.3.1, I encounter two >>>> issues, the second blocking me: >>>> >>>> 1) The maxarg tutorial tries to add a snippet to malloc() in libc.so. >>>> It tries to find the malloc function in the module with substring "libc" >>>> using findModule(). As I understand the API, this will find the module of >>>> libc.so.6, but malloc() may well be implemented in a separate source file, >>>> and hence another module name. I corrected the example by first obtaining >>>> the libc.so.6 BPatch_object, and then using findFunction on the object, >>>> which walks over all modules in the libc.so.6. A findObject() convenience >>>> function on the BPatch_image would be nice here. >>>> >>>> 2) Still, the example cannot find the function malloc() in the libc >>>> object. obj->findFunction("malloc") works on all modules in the libc >>>> object, but fails to find malloc. It does work for free(), returning >>>> "__GI___libc_free" as the function name in /lib/x86_64-linux-gnu/ >>>> libc-2.23.so. >>>> >>>> malloc seems to be present in libc: >>>> $ readelf -s /lib/x86_64-linux-gnu/libc-2.23.so | grep malloc >>>> >>>> 443: 0000000000083550 414 FUNC GLOBAL DEFAULT 13 >>>> __libc_malloc@@GLIBC_2.2.5 >>>> 550: 0000000000086e70 24 FUNC WEAK DEFAULT 13 >>>> malloc_info@@GLIBC_2.10 >>>> 820: 0000000000086560 474 FUNC WEAK DEFAULT 13 >>>> malloc_stats@@GLIBC_2.2.5 >>>> 992: 0000000000083850 539 FUNC WEAK DEFAULT 13 >>>> malloc_get_state@@GLIBC_2.2.5 >>>> 1088: 00000000003c3b10 8 OBJECT WEAK DEFAULT 33 >>>> __malloc_hook@@GLIBC_2.2.5 >>>> 1185: 0000000000083550 414 FUNC GLOBAL DEFAULT 13 >>>> malloc@@GLIBC_2.2.5 >>>> 1221: 00000000000845f0 498 FUNC WEAK DEFAULT 13 >>>> malloc_usable_size@@GLIBC_2.2.5 >>>> 1467: 0000000000086170 705 FUNC WEAK DEFAULT 13 >>>> malloc_trim@@GLIBC_2.2.5 >>>> 1787: 00000000003c57b0 8 OBJECT WEAK DEFAULT 34 >>>> __malloc_initialize_hook@@GLIBC_2.2.5 >>>> 2087: 00000000000856b0 1320 FUNC WEAK DEFAULT 13 >>>> malloc_set_state@@GLIBC_2.2.5 >>>> >>>> And my test program explicitly calls malloc: >>>> >>>> $ nm -g test1/test |grep malloc >>>> U malloc@@GLIBC_2.2.5 >>>> >>>> Any ideas what I do wrong here to try to find and instrument malloc()? >>>> I hope you can help me further. >>>> >>>> Thanks, >>>> >>>> Martijn >>>> mart...@martijnrutten.com >>>> >>>> >>>> _______________________________________________ >>>> Dyninst-api mailing >>>> listdyninst-...@cs.wisc.eduhttps://lists.cs.wisc.edu/mailman/listinfo/dyninst-api >>>> >>>> >>>> >>> >>> >>
_______________________________________________ Dyninst-api mailing list Dyninst-api@cs.wisc.edu https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api