Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 228887 - FreeRADIUS 2.0.4-r1 gets broken with GCC 4.3 and -O2 in CFLAGS
Summary: FreeRADIUS 2.0.4-r1 gets broken with GCC 4.3 and -O2 in CFLAGS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Alin Năstac (RETIRED)
URL: https://lists.freeradius.org/pipermai...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-22 12:26 UTC by Bjarke Istrup Pedersen (RETIRED)
Modified: 2008-07-01 19:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2008-06-22 12:26:32 UTC
When emerging FreeRADIUS 2.0.4-r1 with GCC 4.3 and -O2 in your CFLAGS, broken code gets generated.
It fails to read which port to listen on, and uses a random port for each startup.

Have a look here for more details:
https://lists.freeradius.org/pipermail/freeradius-users/2008-May/msg00419.html

Reproducible: Always

Steps to Reproduce:
1. Install GCC 4.3 or 4.3.1
2. Set your CFLAGS to use -O2
3. Emerge FreeRADIUS 2.0.4-r1

Actual Results:  
When running "radiusd -Xf", you get this at the buttom:

Listening on authentication address * port <RANDOM PORT>
Listening on accounting address * port <RANDOM PORT>

Expected Results:  
It should say:

Listening on authentication address * port 1812
Listening on accounting address * port 1813
Comment 1 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2008-06-22 12:28:21 UTC
Can be fixed easily, just inherit from the flag-o-matic eclass, and add this to the top of src_compile:

strip-flags
replace-flags -O? -O1

(strip-flags is just to be sure).
Comment 2 Carsten Lohrke (RETIRED) gentoo-dev 2008-06-22 16:21:54 UTC
non-critical bug, as not an issue with the stable toolchain
Comment 3 Alin Năstac (RETIRED) gentoo-dev 2008-06-25 21:21:16 UTC
Hmm... This is the gcc's problem! 
Reassigned to toolchain team.
Comment 4 Ryan Hill (RETIRED) gentoo-dev 2008-06-26 04:49:52 UTC
we don't strip flags, we fix gcc to not produce wrong code.
Comment 5 SpanKY gentoo-dev 2008-06-28 18:10:49 UTC
well, for stable versions that are EOL, flag munging is OK (assuming the flags in question are not ricer) ... but gcc-4.3 does not fall under that condition

i dont suppose anyone has spent anytime reducing this ?
Comment 6 Ryan Hill (RETIRED) gentoo-dev 2008-06-28 18:26:03 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=448743

invalid code
Comment 8 SpanKY gentoo-dev 2008-06-28 18:39:11 UTC
building just src/lib/packet.c with -O1 fixes the output in question ...
Comment 9 SpanKY gentoo-dev 2008-06-28 18:40:16 UTC
blah, beat me to it ;)

bug in freeradius, not gcc
Comment 10 Alin Năstac (RETIRED) gentoo-dev 2008-07-01 19:57:24 UTC
Fixed by upstream in version 2.0.5.