This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH] libelf: Use possix_fallocate instead of ftruncate to extend ELF file.
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Wed, 27 May 2015 17:13:37 +0200
- Subject: Re: [PATCH] libelf: Use possix_fallocate instead of ftruncate to extend ELF file.
On Fri, 2015-05-15 at 12:08 +0200, Mark Wielaard wrote:
> Fixed it everywhere and updated the mjw/pending branch. Not pushing yet.
> I would like to know what others think about using posix_fallocate
> instead of ftruncate. There is some discussion on the glibc mailinglist
> about whether or not posix_fallocate actually guarantees to extend the
> file or not. I think it does, that is the main difference with fallocate
> (and ftruncate). But lets see what glibc ends up deciding.
Pushed now to master. It does look like using posix_fallocate in this
particular case over ftruncate is always better. Even if it
theoretically doesn't prevent the SIGBUS issue in all corner cases. In
practice it should.