Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Aug 2003 00:36:09 +0200
From:      Matthias Andree <ma@dt.e-technik.uni-dortmund.de>
To:        "Daniel C. Sobral" <dcs@tcoip.com.br>
Cc:        Current <current@freebsd.org>
Subject:   Re: buildworld failure
Message-ID:  <m3fzjkytuu.fsf@merlin.emma.line.org>
In-Reply-To: <3F4F8DB2.8040701@tcoip.com.br> (Daniel C. Sobral's message of "Fri, 29 Aug 2003 14:30:26 -0300")
References:  <JCEIKJMCANNPGKFKGLKLCEGIDMAA.mikej@trigger.net> <3F4F8DB2.8040701@tcoip.com.br>

next in thread | previous in thread | raw e-mail | index | archive | help
"Daniel C. Sobral" <dcs@tcoip.com.br> writes:

>> 	I've been using freebsd since the 2.x days, I have always compiled world
>> and ports with -O2, and never had any instability issues due to the
>> optimizations. I have switched back to -O and -march=pentium4, the
>> buildworld finished ok.
>
> Lucky you. It does happen that these optimizations may result in code
> with no apparent problem, depending on one's hardware, though I suspect
> many people's "hardware problems" were nothing of the sort.

Not everything that breaks with -O2 is a compiler fault or hardware
running just a tad beyond the limit.

Anecdote: when bogofilter got the "unified" data base a month ago, one
data structure that used to be 8 bytes got extended to 12 bytes. Now,
the variable declaration was still "auto uint32_t cv[2]". memcpy()
copied 12 bytes into the 8 byte buffer (cv) and caused obscure test
suite failures when compiled with optimization on some architectures
(among them 32-bit SPARC), but was fine with lower or no optimization.

(details in sourceforge cvs browser, check src/datastore_db.c 1.29->1.30)

-- 
Matthias Andree

Encrypt your mail: my GnuPG key ID is 0x052E7D95



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m3fzjkytuu.fsf>