Debian bug report logs - #1309
Problems with Debian: gcc or glib
Package: gcc; Reported by: Joao Pedro PEDROSO <jpp@core.ucl.ac.be>; 59 days old.
Message received at debian-bugs:
From core.ucl.ac.be!jpp Mon Sep 4 01:29:13 1995
Return-Path: <jpp@core.ucl.ac.be>
Received: from pixar.com by mongo.pixar.com with smtp
(Smail3.1.28.1 #15) id m0spWtw-000EtYC; Mon, 4 Sep 95 01:29 PDT
Received: from core1ux (core1ux.core.ucl.ac.be) by pixar.com with SMTP id AA08147
(5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Mon, 4 Sep 1995 01:28:45 -0700
Received: from kaj69.core.ucl.ac.be by core1ux (4.1/SMI-4.1)
id AA02629; Mon, 4 Sep 95 10:31:00 +0200
Received: from kaj69.core.ucl.ac.be ([127.0.0.1]) by kaj69.core.ucl.ac.be
with smtp id <m0spWu7-0002qeC@kaj69.core.ucl.ac.be>
(Debian /\oo/\ Smail3.1.29.1 #29.33); Mon, 4 Sep 95 10:29 MET DST
Message-Id: <m0spWu7-0002qeC@kaj69.core.ucl.ac.be>
To: debian-bugs@pixar.com
Subject: Bug#1309 in not produced if compiler optimizes
X-Mailer: Mew beta version 0.96 on Emacs 19.29.1
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Date: Mon, 04 Sep 1995 10:29:18 +0200
From: Joao Pedro PEDROSO <jpp@core.ucl.ac.be>
I realized that the bug is not produced if I compile with
optimization :-) :
[jpp]kaj69:~/C/testing $ cat test.c
#include <math.h>
main() {
double j, k = 1.0;
j = sin(k);
printf("worked\n");
}
[jpp]kaj69:~/C/testing $ gcc -g test.c -lm
[jpp]kaj69:~/C/testing $ ./a.out
Segmentation fault
[jpp]kaj69:~/C/testing $ gcc -g -O test.c -lm
[jpp]kaj69:~/C/testing $ ./a.out
worked
[jpp]kaj69:~/C/testing $
Cheers,
Joao Pedro PEDROSO Universite Catholique de Louvain
CORE - room b.140
jpp@core.ucl.ac.be 34 voie du Roman Pays
Tel: +32-10-474325 B-1348 Louvain-la-Neuve
Fax: +32-10-474301 BELGIUM
----------------------------------------------------------------
Acknowledgement sent to Joao Pedro PEDROSO <jpp@core.ucl.ac.be>
:
Extra info received and forwarded.
Full text available.
Information forwarded to debian-devel@pixar.com
:
Bug#1309
; Package gcc
.
Full text available.
Message received at debian-bugs:
From core.ucl.ac.be!jpp Sat Sep 2 06:53:02 1995
Return-Path: <jpp@core.ucl.ac.be>
Received: from pixar.com by mongo.pixar.com with smtp
(Smail3.1.28.1 #15) id m0sot0I-000ErvC; Sat, 2 Sep 95 06:53 PDT
Received: from core1ux (core1ux.core.ucl.ac.be) by pixar.com with SMTP id AA25882
(5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Sat, 2 Sep 1995 06:52:47 -0700
Received: from kaj69.core.ucl.ac.be by core1ux (4.1/SMI-4.1)
id AA01216; Sat, 2 Sep 95 15:55:05 +0200
Received: from kaj69.core.ucl.ac.be ([127.0.0.1]) by kaj69.core.ucl.ac.be
with smtp id <m0sot0j-0002qeC@kaj69.core.ucl.ac.be>
(Debian /\oo/\ Smail3.1.29.1 #29.33); Sat, 2 Sep 95 15:53 MET DST
Message-Id: <m0sot0j-0002qeC@kaj69.core.ucl.ac.be>
To: debian-bugs@pixar.com
Subject: Problems with Debian: gcc or glib
X-Mailer: Mew beta version 0.96 on Emacs 19.29.1
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Date: Sat, 02 Sep 1995 15:53:24 +0200
From: Joao Pedro PEDROSO <jpp@core.ucl.ac.be>
Package: gcc
Version: 2.6.3-4
Package: libc
Version: 4.6.27-5
Package: binutils
Version: 2.5.2-3
Dear Debian'ers,
I've a problem with gcc/ld and libm. When I compile this program:
--- 8< 8< 8< ---
/* file test.c */
#include <math.h>
main() {
double j, k = 1.0;
j = sin(k);
printf("worked\n");
}
--- >8 >8 >8 ---
with 'gcc test.c -lm', it works fine. But if I try with
'gcc -g test.c -lm', then I get a segmentation fault.
Needless to say, in other platforms gcc does not have this
funny behavior ;-)...
When I try to debug the program compiled with '-g', using
gdb, I get:
--- 8< 8< 8< ---
$ gdb a.out
(gdb) b 1
Breakpoint 1 at 0x1084: file test.c, line 1.
(gdb) run
Starting program: /home/jpp/C/testing/a.out
Program received signal SIGSEGV, Segmentation fault.
0x62f0136e in end ()
(gdb)
--- >8 >8 >8 ---
I am using Debian 0.93R5, kernel version 1.2.13.
Thanks for any enlightenment,
Joao Pedro PEDROSO Universite Catholique de Louvain
CORE - room b.140
jpp@core.ucl.ac.be 34 voie du Roman Pays
Tel: +32-10-474325 B-1348 Louvain-la-Neuve
Fax: +32-10-474301 BELGIUM
----------------------------------------------------------------
Acknowledgement sent to Joao Pedro PEDROSO <jpp@core.ucl.ac.be>
:
New bug report received and forwarded.
Full text available.
Report forwarded to debian-devel@pixar.com
:
Bug#1309
; Package gcc
.
Full text available.
Ian Jackson /
iwj10@thor.cam.ac.uk,
with the debian-bugs tracking mechanism