Re: [PATCH 1/3] packfile: factor out --pack_header argument parsing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> wrote:
> Junio C Hamano wrote:
> > Jeff King peff@xxxxxxxx writes:
> > Interesting. So the file-scope static input_buffer[] sits in the
> > BSS and happens to be well aligned not to cause the problem, but ...
> 
> I suspect it is a problem, but either:
> 
> - The OP's test case was small enough to trigger unpack-objects, not
> index-pack. Possibly:
> 
> git index-pack --stdin --pack_header=2,2 <no-header.pack
> 
> would fail for them.
> 
> - We simply got lucky with alignment based on the other things in BSS,
> the whim of the compiler, etc. But it is an accident waiting to
> happen.
> 
> -Peff

That particular command doesn't seem to crash for me right now, but, as you
said, that is probably just a lucky coincidence that the compiler happens to
place the buffer on aligned memory.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux