overlapping memcpy in HDF5 v1.8.5

Hello HDF5ers,
After profiling some of our internal C++ code that wraps parts of the HDF5 C API, this output came up:

  Source and destination overlap in memcpy(0x99f7ad8, 0x99f7ad8, 15)
  at : memcpy (mc_replace_strmem.c:482)
  by : H5O_attr_write_cb (in libhdf5.so.6)
  by : H5O_msg_iterate_real (in libhdf5.so.6)
  by : H5O_attr_write (in libhdf5.so.6)
  by : H5Awrite (in libhdf5.so.6)
  by : Tools::HDF5::Attribute::write(void const*) ...

Why is it that memcpy is being run at all, if both the source and destination are the same address?

Thanks,
Richard.

FWIW, I thought I saw this in 1.8.4 also but then thought 1.8.5 fixed it
or something like it.

Mark

···

On Sun, 2010-11-07 at 14:32, Richard Khoury wrote:

Hello HDF5ers,
After profiling some of our internal C++ code that wraps parts of the
HDF5 C API, this output came up:

  Source and destination overlap in memcpy(0x99f7ad8, 0x99f7ad8, 15)
  at : memcpy (mc_replace_strmem.c:482)
  by : H5O_attr_write_cb (in libhdf5.so.6)
  by : H5O_msg_iterate_real (in libhdf5.so.6)
  by : H5O_attr_write (in libhdf5.so.6)
  by : H5Awrite (in libhdf5.so.6)
  by : Tools::HDF5::Attribute::write(void const*)
              ...

Why is it that memcpy is being run at all, if both the source and
destination are the same address?

Thanks,
Richard.

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://BLOCKEDmail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

--
Mark C. Miller, Lawrence Livermore National Laboratory
================!!LLNL BUSINESS ONLY!!================
miller86@llnl.gov urgent: miller86@pager.llnl.gov
T:8-6 (925)-423-5901 M/W/Th:7-12,2-7 (530)-753-8511

A thousand apologies. I _just_ perused the patch1 release notes and saw that this resembles the recently fixed Bug #1956.
I'll try this new release out.

Richard.

Richard Khoury wrote:

···

Hello HDF5ers,
After profiling some of our internal C++ code that wraps parts of the HDF5 C API, this output came up:

  Source and destination overlap in memcpy(0x99f7ad8, 0x99f7ad8, 15)
  at : memcpy (mc_replace_strmem.c:482)
  by : H5O_attr_write_cb (in libhdf5.so.6)
  by : H5O_msg_iterate_real (in libhdf5.so.6)
  by : H5O_attr_write (in libhdf5.so.6)
  by : H5Awrite (in libhdf5.so.6)
  by : Tools::HDF5::Attribute::write(void const*) ...

Why is it that memcpy is being run at all, if both the source and destination are the same address?

Thanks,
Richard.

--
Richard Khoury
R&D
T: +61 2 9383 4602