libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] Re: [patch] Eliminate some unnecessary msync() calls.


From: Mattias Engdegård
Subject: [Libunwind-devel] Re: [patch] Eliminate some unnecessary msync() calls.
Date: Wed, 2 Dec 2009 09:35:13 +0000 (UTC)
User-agent: nn/6.7.3

address@hidden (Paul Pluzhnikov) writes:

>While doing strace on an executable using libunwind, I noticed a
>lot of:

>  msync(0, 1, MS_SYNC) = -1 ENOMEM (Cannot allocate memory)

Speaking of which, I don't believe msync() fails on non-readable
memory (PROT_NONE), so it isn't a perfectly reliable way of verifying
whether an address can be read from without segfaulting. In another
stack trace application, we had to abandon msync() for this purpose
and use pread() from /proc/self/mem instead - more expensive, but safer.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]