Bug 131679 - Compiling in 64-bit yields segmentation fault when program run, 32-bit compilation is fine
Compiling in 64-bit yields segmentation fault when program run, 32-bit compil...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
2
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-02 23:47 EDT by Fred Huang
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-03 03:41:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Fred Huang 2004-09-02 23:47:30 EDT
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-02 23:48:11 EDT
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.