tech-userlevel archive

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

Re: alignement or compiler bug?



> Everything is size_t, which is unsigned AFAIK

Doh!  I got size_t and ssize_t mixed up.

> In a core dump left from a previous attempt, data_len is 0xbb5d7050
> so it would say it is really corrupted.

Yeah, unless your PAGE_SIZE is 16 or less, which seems unlikely. :-)
Or not a power of two, I suppose, which seems even less likely.

> Here is the assembly leading to memcpy. The 0x28 is sizeof(*fwi),
> which suggests a correct (fwi + 1)

Indeed.

> It seems to be the test that saves my day:
>  if (data != ((char *)fwi) + sizeof(*fwi))

How odd.  The only theory I have which can account for that is a
compiler bug of some sort, and the code you quoted looks correct, at
least on superficiall inspection.

I'd have to have a look at the code you omitted.  It's late enough now
I'm not going to try to deal with figuring out pkgsrc now, though.  I
hope to find the time to have a look in the next few days....

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index