https://sourceware.org/bugzilla/show_bug.cgi?id=29292

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick.alcock at oracle dot com

--- Comment #1 from Rainer Orth <ro at gcc dot gnu.org> ---
The issue persists up to binutils 2.44.90.  Investigating some more, I can
confirm that disabling mmap (with ac_cv_func_mmap_fixed_mapped=no) fixes the
failures.

What I found is that after arc_mmap_unmap unmaps the CTF header, when it is
read back in ctf_link_write the buffer is all zeros.

I suspected that the msync (header, headersz, MS_ASYNC) call in
arc_mmap_writeout
might be a problem (buffer not yet synced to disk when it's read back using
fread), but changing that to MS_SYNC didn't make a difference.

I'll try to create a minimal testcase (just tmpfile, mmap, fill buffer, msync,
munmap, fread) to see if the problem reproduces there.

However, I very much wonder what's the advantage of this complicated
mmap/msync/munmap
dance instead of just writing the header to the tmp file and be done with it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to