> ==9070== Lock at 0xD81F6F8 was first observed > ==9070== at 0x4C3077F: QMutex::QMutex(QMutex::RecursionMode) > (hg_intercepts.c:2186) > ==9070== by 0x4C307A4: QMutex::QMutex(QMutex::RecursionMode) > (hg_intercepts.c:2192) > ==9070== by 0x585A9CE: QPostEventList::QPostEventList() (qthread_p.h:110) > [...] > > Should I just duplicate the code of the wrappers instead? > Or is there a more clever solution I'm missing?
One alternative approach -- which doesn't really solve the problem, but which you might want to look at -- is to put the real code in a worker function and call that from all entry points. For example, see how sem_wait_WRK is used in hg_intercepts.c. That doesn't get rid of the second stack frame, but it does at least avoid the impression that there's some kind of strange recursion going on. Personally I quite like this scheme, in that it doesn't duplicate code. If you turned the __attribute__((noinline)) into __attribute__((always_inline)) then I think you'd get rid of the extra frame without having to duplicate the code by hand. > What I don't know is whether some implementations might should differ from the > Qt4 implementation... Right. That's the real problem. I don't think there's an easy way to figure this out, short of comparing the Qt4 and Qt5 implementations of the relevant functions. Once you have a patch you're satisfied with, I'd be happy to commit it. J ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users