This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [PATCH] strip don't mmap debug output file.
- From: Mark Wielaard <mark at klomp dot org>
- To: elfutils-devel at sourceware dot org
- Date: Mon, 24 Jun 2019 23:54:37 +0200
- Subject: Re: [PATCH] strip don't mmap debug output file.
- References: <1560858629-21449-1-git-send-email-mark@klomp.org>
On Tue, 2019-06-18 at 13:50 +0200, Mark Wielaard wrote:
> Using ELF_C_WRITE_MMAP sometimes causes unexpected errors when disk
> space is low. When writing out the file, the output file is first
> extended so that it covers the whole file/mmap size. But it might
> be that the file system allowed the extension as a sparse file. In
> that case writing to the file through the mmap might still fail and
> produce a SIGBUS if the disk is full. This is confusing to the user.
>
> Using ELF_C_WRITE will produce "normal" errors when the file cannot
> be written out. It also seems to use less memory because the debug
> file is created from scratch. So the memory is first read into the
> ELF data structure buffers, then written out as a whole. In this case
> the mmap output buffer is just overhead.
I pushed this to master.