public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/65909] New: check_v3_target_namedlocale blows up on targets that don't support command-line arguments
@ 2015-04-27 22:20 sandra at gcc dot gnu.org
  2015-04-27 22:46 ` [Bug libstdc++/65909] " redi at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: sandra at gcc dot gnu.org @ 2015-04-27 22:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65909

            Bug ID: 65909
           Summary: check_v3_target_namedlocale blows up on targets that
                    don't support command-line arguments
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sandra at gcc dot gnu.org
  Target Milestone: ---

Created attachment 35410
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35410&action=edit
proposed patch

The test program written by check_v3_target_namedlocale in lib/libstdc++.exp
accesses the string at *(argv + 1) without first checking that argc >= 2.  Some
embedded targets don't support command-line arguments, so even though the
testsuite may always invoke the test program with the required number of
arguments, the program may not receive them.

I'm working with a new simulator provided by a customer that prints an error
message for accesses to unmapped memory and then continues execution instead of
terminating with an exception.  I ended up with a 2.4TB log file from running
the libstdc++ testsuite because of this problem.  :-(

I hacked up the attached patch as a quick fix; it has the effect of making it
think the requested locale is unsupported if the target has this problem.  A
better solution might be to write and compile a fresh program every time with a
hard-coded locale name to test for.  I guess it depends on whether you think
embedded targets that don't support programs with command-line arguments will
still be able to support named locales.

I ran into this in a local GCC 4.9.2 build but the code is the same on mainline
head.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-28  2:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-27 22:20 [Bug libstdc++/65909] New: check_v3_target_namedlocale blows up on targets that don't support command-line arguments sandra at gcc dot gnu.org
2015-04-27 22:46 ` [Bug libstdc++/65909] " redi at gcc dot gnu.org
2015-04-27 22:46 ` sandra at gcc dot gnu.org
2015-04-28  2:41 ` sandra 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).