Bug 131679 - Compiling in 64-bit yields segmentation fault when program run, 32-bit compilation is fine
Summary: Compiling in 64-bit yields segmentation fault when program run, 32-bit compil...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-09-03 03:47 UTC by Fred Huang
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-03 07:41:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
The test file that I was testing 64-bit compilation with. (1.51 KB, text/x-csrc)
2004-09-03 03:48 UTC, Fred Huang
no flags Details

Description Fred Huang 2004-09-03 03:47:30 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7)
Gecko/20040808 Firefox/0.9.3

Description of problem:
Compiling a simple C program with gcc in 64-bit mode. When the program
is run, it seg faults. GDB reports:

Program received signal SIGSEGV, Segmentation fault.
0x000000344026e3a0 in strlen () from /lib64/tls/libc.so.6

Backtrace:
#0  0x000000344026e3a0 in strlen () from /lib64/tls/libc.so.6
#1  0x0000003440240a01 in vfprintf () from /lib64/tls/libc.so.6
#2  0x0000000000400570 in io_vprint ()
#3  0x0000000000400644 in io_printf ()
#4  0x00000000004006cc in main ()

When the same C program is compiled with gcc but in 32-bit mode (with
the flag -m32) it works fine.

The program being used is attached and can also be downloaded at:
http://home.comcast.net/~thefrabbit/test_var.c

Version-Release number of selected component (if applicable):
kernel-2.6.5-1.358 gcc-3.4.1-9 glibc-2.3.3-27

How reproducible:
Always

Steps to Reproduce:
1. gcc -Wall test_var.c -o test
2. ./test
    

Actual Results:  The message is outputted to the command line
(correct) along with the error message "Segmentation fault".

Expected Results:  The message should be outputted to the command
line, but also a file (temp3.txt) should be created and the same
message should be written into that file.

Additional info:

Building on an Athlon64, FC2 X86_64.

Comment 1 Fred Huang 2004-09-03 03:48:11 UTC
Created attachment 103420 [details]
The test file that I was testing 64-bit compilation with.


Note You need to log in before you can comment on or make changes to this bug.