Re: Cyrus IMAPd 2.3.7 Released

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

 



On Wed, Jul 12, 2006 at 05:02:10PM +0400, Дейтер Александр Валериевич wrote:

> Core was generated by
> `/home/devel/build/cyrus-imapd-2.3.7/imap/reconstruct -rf user.devel'.
> Program terminated with signal 10, Bus error.
> #0  0x0000000100011e04 in mailbox_write_index_header
> (mailbox=0xffffffff7fff3f70) at mailbox.c:1319
> 1319        *((bit64 *)(buf+OFFSET_HIGHESTMODSEQ_64)) =
> htonll(mailbox->highestmodseq);

Could you do a "p &buf" here? My guess would be that it is not 8-byte
aligned (because nobody told the compiler that it should be), and
therefore the code above generates an unaligned access, which explains
the bus error perfectly.

You can also try to replace

	char buf[INDEX_HEADER_SIZE];

with

	union {
		char buf[INDEX_HEADER_SIZE];
	#ifdef HAVE_LONG_LONG_INT
		long long int dummy;
	#endif
	} u;

to force the required alignment, and also replace every reference to
"buf" with "u.buf" inside the function. You may also use an unnamed
union and avoid the u.buf replaces if the Sun compiler supports unnamed
unions.

Gabor

-- 
     ---------------------------------------------------------
     MTA SZTAKI Computer and Automation Research Institute
                Hungarian Academy of Sciences
     ---------------------------------------------------------
----
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux