bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH 5/9] ext2fs: fix type of inum


From: Justus Winter
Subject: Re: [PATCH 5/9] ext2fs: fix type of inum
Date: Mon, 28 Apr 2014 12:52:54 +0200
User-agent: alot/0.3.4

Quoting Samuel Thibault (2014-04-28 12:34:43)
> Justus Winter, le Mon 28 Apr 2014 12:20:00 +0200, a écrit :
> > Previously, inum was of type int, whereas dino_ref expects ino_t.  On
> > Hurd/x86 the former is 32 bit wide, the latter 64.  If dino_ref is
> > inlined, this does not seem to pose a problem, but if ext2fs is
> > compiled with -O0, this most likely results in an invalid memory access.
> 
> Why would there be an invalid memory access? The compiler will just
> truncate the value before passing it as scalar parameter.

Yes, funny that.  I turned on -O0 and then spent a night wondering why
ext2fs kept segfaulting after an innocent mechanical change to my
patch series :(

Turned out that somehow a perfectly innocent inode number like 17 got
turned into a gigantic 64-bit value.  I have no explanation for this.

Justus



reply via email to

[Prev in Thread] Current Thread [Next in Thread]