[Dovecot] IMAP crashes with signal 10 (SIGBUS)

Joseph Tam tam at math.ubc.ca
Tue Jan 11 02:19:02 EET 2005


On Sat, 8 Jan 2005, Timo Sirainen wrote:

> On 8.1.2005, at 01:59, Joseph Tam wrote:
>
>> Subsequent versions still crashed and I looked into the problem further. 
>> Specifically it
>> crashes at this line
>> 
>>  	offset = *((const uint64_t *)data);
>> 
>> when "data" assumes a non-64 bit aligned value.  At first I thought that 
>> 64-bit
>> ints should always be aligned on 64-bit boundaries, but when I isolated 
>> this code
>> into a standalone executable to demonstrate it (no arguments to cause a 
>> crash, one
>> argument is OK):
>
> The bug is that the data pointer in there should always be 64bit aligned. 
> There exists code which tries to keep it 64bit aligned, but apparently 
> there's a bug somewhere. I haven't yet tried to find it. So many other things 
> to do..

Thanks, Timo.  If it helps, I traced the non-64 aligned value to this statement,

 	dovecot-1.0-test59/src/lib-index/mail-index-view.c:394
 		*data_r = offset == 0 ? NULL : CONST_PTR_OFFSET(rec, offset);
 		rec=ff2500bc offset=8 -> *data_r=ff2500c4

Joseph Tam <tam at math.ubc.ca>


More information about the dovecot mailing list