public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "corsepiu at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/26991] Target Help Seg Fault.
Date: Mon, 26 Jun 2006 16:46:00 -0000	[thread overview]
Message-ID: <20060626164142.22520.qmail@sourceware.org> (raw)
In-Reply-To: <bug-26991-12460@http.gcc.gnu.org/bugzilla/>



------- Comment #3 from corsepiu at gcc dot gnu dot org  2006-06-26 16:41 -------
Traceback:

Program received signal SIGSEGV, Segmentation fault.
print_filtered_help (flag=4194304) at ../../gcc-4.1.1/gcc/opts.c:1301
(gdb) where
#0  print_filtered_help (flag=4194304) at ../../gcc-4.1.1/gcc/opts.c:1301
#1  0x081f61d7 in decode_options (argc=13, argv=0xbfc6fc34) at
../../gcc-4.1.1/gcc/opts.c:738
#2  0x08243b08 in toplev_main (argc=13, argv=0xbfc6fc34) at
../../gcc-4.1.1/gcc/toplev.c:1975
#3  0x080978f2 in main (argc=0, argv=0x1f9) at ../../gcc-4.1.1/gcc/main.c:35
#4  0x00b68724 in __libc_start_main () from /lib/libc.so.6
#5  0x08049ad1 in _start ()

The offending code is this (From gcc-4.1.1/gcc/opts.c):

1293   const char *help, *opt, *tab;
1294   static char *printed;
1295 
1296   if (flag == CL_COMMON || flag == CL_TARGET)
1297     {
1298       filter = flag;
1299       if (!printed)
1300         printed = xmalloc (cl_options_count);
1301       memset (printed, 0, cl_options_count);
1302     }

=> the SEGFAULT occurs in memset.

Could it be, "static char* printed" should be initialized = 0?

I.e. static char* printed = 0;


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26991


  parent reply	other threads:[~2006-06-26 16:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-02 17:22 [Bug c++/26991] New: " dave dot m at email dot it
2006-04-02 17:33 ` [Bug middle-end/26991] " pinskia at gcc dot gnu dot org
2006-04-03 17:43 ` pinskia at gcc dot gnu dot org
2006-06-26 15:03 ` corsepiu at gcc dot gnu dot org
2006-06-26 16:46 ` corsepiu at gcc dot gnu dot org [this message]
2006-06-26 16:47   ` Andrew Pinski
2006-06-26 16:47 ` pinskia at physics dot uc dot edu
2006-06-26 16:49 ` [Bug middle-end/26991] [4.1 Regression] " pinskia at gcc dot gnu dot org
2006-06-26 17:01 ` pinskia at gcc dot gnu dot org
2006-06-26 17:06 ` corsepiu at gcc dot gnu dot org
2006-06-26 17:22 ` pinskia at gcc dot gnu dot org
2006-06-29 10:06 ` jakub at gcc dot gnu dot org
2006-06-29 10:49 ` jakub at gcc dot gnu dot org
2006-07-04 13:48 ` jakub at gcc dot gnu dot org
2006-07-04 14:38 ` pinskia at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060626164142.22520.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).