public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/17302] New: Segmentation Fault in X86_64, ok compiling on 32-bit
@ 2004-09-03  1:05 dafrabbit at yahoo dot com
  2004-09-03  1:09 ` [Bug c/17302] " dafrabbit at yahoo dot com
  2004-09-03  1:18 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: dafrabbit at yahoo dot com @ 2004-09-03  1:05 UTC (permalink / raw)
  To: gcc-bugs

Small c program causes seg fault if compiled with gcc 3.3.3-7 and 3.4.1-9 in
64-bit mode, but works fine if compiled in 32-bit mode.

To reproduce:
1. gcc -g test_var5.c
2. gcc -o test5.exe test_var5.o
3. test5.exe

Build environment is AMD64 on Fedora Core 2 (Kernel 2.6.5-1.358).

Test case is as follows:

#include <stdarg.h>
#include <stdlib.h>
#include <signal.h>
#include <ctype.h>
#include <math.h>
                                                                               
                                                                             
#include <stdio.h>
                                                                               
                                                                             
FILE *log_stream_g = 0;
FILE *out_fp;
                                                                               
                                                                             
void io_vprint(fmt, ap)
char *fmt;      /* format string */
va_list ap;
{
    vfprintf(out_fp, fmt, ap);
    vfprintf(log_stream_g, fmt, ap);
                                                                               
                                                                             
}
                                                                               
                                                                             
void io_printf(char *fmt, ...)
{
    va_list args;
                                                                               
                                                                             
    va_start(args, fmt);
                                                                               
                                                                             
    io_vprint(fmt, args);
    va_end(args);
}
                                                                               
                                                                             
main()
{
    FILE *stream = 0;
                                                                               
                                                                             
    out_fp = stdout;
    if ((stream = (FILE *) fopen("temp3.txt", "w")) == 0)
    {
      io_printf("failed to open log\n");
    }
    else
      log_stream_g = stream;
    io_printf("%s%s%s%s%s%s",
             "**********************************************************\n",
             "* Copyright  Systems, Inc. 2000.             *\n",
             "*     All Rights Reserved.       Licensed Software.      *\n",
             "* Confidential and proprietary information which is the  *\n",
             "*      property of Design Systems, Inc.            *\n",
            "**********************************************************\n\n"
            );
}

-- 
           Summary: Segmentation Fault in X86_64, ok compiling on 32-bit
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: critical
          Priority: P1
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dafrabbit at yahoo dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c/17302] Segmentation Fault in X86_64, ok compiling on 32-bit
  2004-09-03  1:05 [Bug c/17302] New: Segmentation Fault in X86_64, ok compiling on 32-bit dafrabbit at yahoo dot com
@ 2004-09-03  1:09 ` dafrabbit at yahoo dot com
  2004-09-03  1:18 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: dafrabbit at yahoo dot com @ 2004-09-03  1:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dafrabbit at yahoo dot com  2004-09-03 01:09 -------
Created an attachment (id=7036)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7036&action=view)
The test case. Is a C program (same code as mentioned in original posting)


-- 


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


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

* [Bug c/17302] Segmentation Fault in X86_64, ok compiling on 32-bit
  2004-09-03  1:05 [Bug c/17302] New: Segmentation Fault in X86_64, ok compiling on 32-bit dafrabbit at yahoo dot com
  2004-09-03  1:09 ` [Bug c/17302] " dafrabbit at yahoo dot com
@ 2004-09-03  1:18 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-03  1:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-03 01:18 -------
This is not our bug, please report it to glibc.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WONTFIX


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


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

end of thread, other threads:[~2004-09-03  1:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-03  1:05 [Bug c/17302] New: Segmentation Fault in X86_64, ok compiling on 32-bit dafrabbit at yahoo dot com
2004-09-03  1:09 ` [Bug c/17302] " dafrabbit at yahoo dot com
2004-09-03  1:18 ` pinskia at gcc dot gnu dot 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).