This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.
> https://sourceware.org/ml/libc-alpha/2015-04/msg00309.html

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.

Cheers,

Mark

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]