Re: buildworld failure

From: Matthias Andree <ma_at_dt.e-technik.uni-dortmund.de>
Date: Sat, 30 Aug 2003 00:36:09 +0200
"Daniel C. Sobral" <dcs_at_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
Received on Fri Aug 29 2003 - 13:36:14 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:20 UTC