[PATCH 0.9.33 0/7] Backport pread/pwrite fixes from master

Natanael Copa natanael.copa at gmail.com
Wed Aug 29 14:50:37 UTC 2012


On Wed, Aug 29, 2012 at 2:42 PM, Johannes Stezenbach <js at sig21.net> wrote:
> Hi Natanael,
>
> On Wed, Aug 29, 2012 at 09:18:57AM +0000, Natanael Copa wrote:
>> I previously sent a bug report for pread/pwrite with a link to a
>> patch that i hacked up quick and dirty. This showed up to be severly
>> broken on x86_64 and corrupted several qemu disks images for me.
>>
>> I see that this bad patch made it into 0.9.33 stabel tree. I think it
>> should be reverted and instead use cherry-picks from master. This is
>> what we currently use with success in Alpine Linux.
>>
>> Tested on x86_64 and x86.
>
> I just built a toolchain for ARM from 0.9.33 stable branch
> and I'm trying to figure out if the breakage is x86_64 only.
> could you give more details what breaks and why?

It is only 64bit that is broke. On 64bit it should be an alias to the
pread64/pwrite64 syscalls and not do the offset hi/lo stuff like it
need to do on 32bit. The result was that offsets bigger than 4G (or
2G?) got cutted. Typical 64 bit vs 32 bit bug.

-- 
Natanael Copa


More information about the uClibc mailing list