i386 memory fence incompatible with valgrind

Matthias Urlichs matthias at urlichs.de
Thu Jan 12 10:33:50 CET 2017

On 11.01.2017 23:10, Marc Lehmann wrote:
> Personally, I would do as I suggesxted in my first reply, namly asking
> them to correctly recognize the memory fence instruction.
As I thought, the author of valgrind states that what you're doing is
not OK.

If you think Julian is wrong, please talk to him directly.

https://bugs.kde.org/show_bug.cgi?id=374940 ::
Julian Seward <mailto:jseward at acm.org>:

The libev code is incorrect and should be fixed.  It it violates the ABI.
The problem isn't that the memory is uninitialised.  It is that the
program isn't allowed to access below %esp at any time, for at least
the following reasons:

* a signal may get delivered at any time, in which case the signal
  handler's frame will overwrite the value at -1(%esp).

* since the kernel "knows" that programs may not access below %esp, it
  would be within its rights to unmap the page containing -1(%esp).
  If %esp pointed exactly to the bottom of a page then the access
  at -1(%esp) would cause an unexpected page (segmentation) fault.

-- Matthias Urlichs

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20170112/78d95cae/attachment.html>

More information about the libev mailing list