Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI users] memcpy overlap in ompi_ddt_copy_content_same_ddt and glibc 2.12
From: e-mail number.cruncher (number.cruncher_at_[hidden])
Date: 2010-11-10 16:08:23

On 10 November 2010 17:25, Jed Brown <jed_at_[hidden]> wrote:
> Is the memcpy-back code ever executed when called as memcpy()?  I can't
> imagine why it would be, but it would make plenty of sense to use it inside
> memmove when the destination is at a higher address than the source.
> Jed

Oh yes. And, after further reading, it seems I'm not alone. There's an
article at about the new glibc changes
and a bug at
relating directly to memcpy. The Fedora bug is particularly insightful
with some interesting contributions from Linus Torvalds himself,
amongst other.

In short, someone from Intel submitted a glibc patch that does faster
memcpy's on e.g. Intel i7, respects the ISO C definition, but does
things backwards. I think any software that ignores the ISO warning
"If copying takes place between objects that overlap, the behavior is
undefined" needs fixing.