Debian bug report logs - #1309 , boring messages ----------------------------------------------------------------------- Message sent to debian-devel@pixar.com: Subject: Bug#1309: Problems with Debian: gcc or glib Reply-To: Joao Pedro PEDROSO , debian-bugs@pixar.com Resent-From: Joao Pedro PEDROSO Resent-To: debian-devel@pixar.com Resent-Date: Sat, 02 Sep 1995 14:03:03 GMT Resent-Message-ID: Resent-Sender: iwj10@cus.cam.ac.uk X-Debian-PR-Package: gcc X-Debian-PR-Keywords: Received: via spool for debian-bugs; Sat, 02 Sep 1995 14:03:03 GMT Received: with rfc822 via encapsulated-mail; Sat, 02 Sep 1995 13:54:04 GMT 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 (Debian /\oo/\ Smail3.1.29.1 #29.33); Sat, 2 Sep 95 15:53 MET DST Message-Id: To: debian-bugs@pixar.com 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 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 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 ---------------------------------------------------------------- ----------------------------------------------------------------------- Message sent: From: iwj10@thor.cam.ac.uk (Ian Jackson) To: Joao Pedro PEDROSO Subject: Bug#1309: Acknowledgement (was: Problems with Debian: gcc or glib) In-Reply-To: References: Thank you for the problem report you have sent regarding Debian GNU/Linux. This is an automatically generated reply, to let you know your message has been received. It is being forwarded to the developers' mailing list for their attention; they will reply in due course. If you wish to submit further information on your problem, please send it to debian-bugs@pixar.com, but please ensure that the Subject line of your message starts with "Bug#1309" or "Re: Bug#1309" so that we can identify it as relating to the same problem. Please do not reply to the address at the top of this message, unless you wish to report a problem with the bug-tracking system. Ian Jackson (maintainer, debian-bugs) ----------------------------------------------------------------------- Message sent to debian-devel@pixar.com: Subject: Bug#1309: in not produced if compiler optimizes Reply-To: Joao Pedro PEDROSO , debian-bugs@pixar.com Resent-From: Joao Pedro PEDROSO Resent-To: debian-devel@pixar.com Resent-Date: Mon, 04 Sep 1995 08:33:04 GMT Resent-Message-ID: Resent-Sender: iwj10@cus.cam.ac.uk X-Debian-PR-Package: gcc X-Debian-PR-Keywords: Received: via spool for debian-bugs; Mon, 04 Sep 1995 08:33:04 GMT Received: with rfc822 via encapsulated-mail; Mon, 04 Sep 1995 08:30:20 GMT 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 (Debian /\oo/\ Smail3.1.29.1 #29.33); Mon, 4 Sep 95 10:29 MET DST Message-Id: To: debian-bugs@pixar.com 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 I realized that the bug is not produced if I compile with optimization :-) : [jpp]kaj69:~/C/testing $ cat test.c #include 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 ---------------------------------------------------------------- ----------------------------------------------------------------------- Message sent: From: iwj10@thor.cam.ac.uk (Ian Jackson) To: Joao Pedro PEDROSO Subject: Bug#1309: Info received (was Bug#1309 in not produced if compiler optimizes) In-Reply-To: References: Thank you for the additional information you have supplied regarding this problem report. It has been forwarded to the developers to accompany the original report. If you wish to continue to submit further information on your problem, please do the same thing again: send it to debian-bugs@pixar.com, ensuring that the Subject line starts with "Bug#1309" or "Re: Bug#1309" so that we can identify it as relating to the same problem. Please do not reply to the address at the top of this message, unless you wish to report a problem with the bug-tracking system. Ian Jackson (maintainer, debian-bugs) ----------------------------------------------------------------------- Ian Jackson / iwj10@thor.cam.ac.uk , with the debian-bugs tracking mechanism This page last modified 07:43:01 GMT Wed 01 Nov