public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/35855] New: build locale not properly handled with awk scripts
@ 2008-04-07 6:17 vapier at gentoo dot org
2009-03-10 17:24 ` [Bug bootstrap/35855] " urmet dot saar at gmail dot com
0 siblings, 1 reply; 6+ messages in thread
From: vapier at gentoo dot org @ 2008-04-07 6:17 UTC (permalink / raw)
To: gcc-bugs
the gcc build system has some awk scripts that use unsafe character ranges:
$ grep a-z gcc/*.awk
gcc/optc-gen.awk: gsub( "[^A-Za-z0-9_]", "X", macros[i] )
gcc/optc-gen.awk: gsub ("[^A-Za-z0-9]", "_", enum)
gcc/opt-functions.awk: gsub ("[^A-Za-z0-9]", "_", name)
gcc/opth-gen.awk: gsub( "[^A-Za-z0-9_]", "X", macros[i] )
gcc/opth-gen.awk: gsub ("[^A-Za-z0-9]", "_", enum)
A-Z will not match the expected alphabet (the range as defined by the "C"
locale) in all locales. while this has always been a problem, it went
unnoticed as the incorrect munging is consistent in nature. with gcc-4.3, the
incorrect munging results in a conflict of symbols and triggers a build
failure.
i cant seem to find any precedent as to the correct fix. i would personally
just change everything to [:alnum:], but the only use of such character classes
that i can find via a quick grep is in the lex files. another solution would
be to execute the awk stuff via configure as it sets up a clean environment.
or you can prepend "env LC_ALL=C" to the AWK variable setup via configure, but
this ignores the problems that configure solves automatically.
--
Summary: build locale not properly handled with awk scripts
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vapier at gentoo dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35855
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <bug-35855-4@http.gcc.gnu.org/bugzilla/>]
* [Bug bootstrap/35855] build locale not properly handled with awk scripts
[not found] <bug-35855-4@http.gcc.gnu.org/bugzilla/>
@ 2010-09-26 13:18 ` rwild at gcc dot gnu.org
2010-09-27 9:17 ` vapier at gentoo dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: rwild at gcc dot gnu.org @ 2010-09-26 13:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35855
--- Comment #2 from Ralf Wildenhues <rwild at gcc dot gnu.org> 2010-09-26 06:07:56 UTC ---
Proposed patch at <http://gcc.gnu.org/ml/gcc-patches/2010-09/msg02027.html>.
You don't state how exactly the build fails, and what locale you needed to set
for the failure to become apparent. That makes it harder to find out whether a
patch fixes it. Please state so, and also please try out the patch. Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug bootstrap/35855] build locale not properly handled with awk scripts
[not found] <bug-35855-4@http.gcc.gnu.org/bugzilla/>
2010-09-26 13:18 ` rwild at gcc dot gnu.org
@ 2010-09-27 9:17 ` vapier at gentoo dot org
2010-10-11 17:59 ` rwild at gcc dot gnu.org
2010-10-11 18:58 ` rwild at gcc dot gnu.org
3 siblings, 0 replies; 6+ messages in thread
From: vapier at gentoo dot org @ 2010-09-27 9:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35855
--- Comment #3 from Mike Frysinger <vapier at gentoo dot org> 2010-09-26 20:16:07 UTC ---
the same locale that breaks every time: et_EE
example build failure:
http://bugs.gentoo.org/215828
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug bootstrap/35855] build locale not properly handled with awk scripts
[not found] <bug-35855-4@http.gcc.gnu.org/bugzilla/>
2010-09-26 13:18 ` rwild at gcc dot gnu.org
2010-09-27 9:17 ` vapier at gentoo dot org
@ 2010-10-11 17:59 ` rwild at gcc dot gnu.org
2010-10-11 18:58 ` rwild at gcc dot gnu.org
3 siblings, 0 replies; 6+ messages in thread
From: rwild at gcc dot gnu.org @ 2010-10-11 17:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35855
--- Comment #4 from Ralf Wildenhues <rwild at gcc dot gnu.org> 2010-10-11 17:58:56 UTC ---
Author: rwild
Date: Mon Oct 11 17:58:53 2010
New Revision: 165322
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165322
Log:
Fix PR bootstrap/35855: awk character classes.
gcc/:
PR bootstrap/35855
* opt-functions.awk (BEGIN): New section.
(lower, upper, digit, alnum): New variables.
(static_var, opt_sanitized_name): Use alnum instead of character
classes, for non-C locale.
* optc-gen.awk: Likewise.
* opth-gen.awk: Likewise.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/opt-functions.awk
trunk/gcc/optc-gen.awk
trunk/gcc/opth-gen.awk
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug bootstrap/35855] build locale not properly handled with awk scripts
[not found] <bug-35855-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2010-10-11 17:59 ` rwild at gcc dot gnu.org
@ 2010-10-11 18:58 ` rwild at gcc dot gnu.org
3 siblings, 0 replies; 6+ messages in thread
From: rwild at gcc dot gnu.org @ 2010-10-11 18:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35855
Ralf Wildenhues <rwild at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Known to work| |4.6.0
Resolution| |FIXED
--- Comment #5 from Ralf Wildenhues <rwild at gcc dot gnu.org> 2010-10-11 18:58:27 UTC ---
Fixed in trunk.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-10-11 18:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-07 6:17 [Bug other/35855] New: build locale not properly handled with awk scripts vapier at gentoo dot org
2009-03-10 17:24 ` [Bug bootstrap/35855] " urmet dot saar at gmail dot com
[not found] <bug-35855-4@http.gcc.gnu.org/bugzilla/>
2010-09-26 13:18 ` rwild at gcc dot gnu.org
2010-09-27 9:17 ` vapier at gentoo dot org
2010-10-11 17:59 ` rwild at gcc dot gnu.org
2010-10-11 18:58 ` rwild at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).