On Thu, 2014-04-03 at 15:33 -0700, janjust wrote: > Philippe, > This worked! Thank you so much for your help. > > So your hypothesis is correct. The huge_pages (at least on my system) have > an alignment issue if MAP_FIXED is used, and no alignment issue if it's not > used. > > The syswrap-generic.c seems to always use MAP_FIXED, is that a valgrind > requirement? That is the way today Valgrind manages memory. I think it could work without (cfr your patch) or at least use MAP_FIXED only as a first preferred way to do an mmap.
> > At any rate, I filed a bug report, and attached a potential patch (which > worked for me), but I'm not sure if I did this correctly. All I did is added > another "refinement" fallback to do a 3rd mmap() ignoring the MAP_FIXED. > > This could be done better though but maybe giving aspacemanager a hint to > give me a hugepage_size aligned address if it fails the second time. > > Here is the bug report and the patch should be attached (again the patch is > brutally simple). > > https://bugs.kde.org/show_bug.cgi?id=333051 Ok, thanks for the feedback, the bug and the patch. Touching mmap and aspacemgr area is a touchy area, so for sure this patch will have to be carefully looked at. But a bug with a patch (and even better, with a test case) is more likely to attract attention :). > > Also I have another issue but it seems to work, for now… > > I get a warning with: > ==21390== Warning: noted but unhandled ioctl 0x7801 with no size/direction > hints > > Any ideas what that is? Valgrind must have some little code so that it "understands" what a syscall is doing (e.g. what memory it is reading and writing). There are a bunch of ioctl variety, and Valgrind does not understand them all. Such not understood ioctl causes such msgs (and then could cause false positive or false negative e.g. in memcheck). I think you will find more info in README_MISSING_SYSCALL_OR_IOCTL Philippe ------------------------------------------------------------------------------ _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users