Description of problem: The httpAddrGetList() function from libcups (cups-1.2.1/cups/http-addrlist.c) is miscompiled at -O2. The symptom is that httpAddrGetList("localhost",AF_UNSPEC,"631") fails to return an address when /etc/hosts looks like this: # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 primary 127.0.0.1 localhost.localdomain There is code in httpAddrGetList() specifically to handle such a misconfigured /etc/hosts, but it is not getting triggered because an automatic local variable (addr) is not getting correctly initialized. Version-Release number of selected component (if applicable): gcc-4.1.0-3, also gcc-4.1.0-17 How reproducible: 100% Steps to Reproduce: 1. Back up /etc/hosts 2. cat >/etc/hosts <<"EOF" # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 primary 127.0.0.1 localhost.localdomain EOF gcc -g -O2 -o http-addrlist http-addrlist.c ./http-addrlist Actual results: failure Expected results: success Additional info: Original bug report is bug #192628.
Created attachment 129909 [details] http-addrlist.c
Hmm, test case seems to always say 'failure'. I will try to distill it again. FWIW, compiling the original with '-O2 -fno-strict-aliasing' makes no difference.
Oh, never mind, false alarm. Sorry for the noise.