[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1309: Problems with Debian: gcc or glib



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
----------------------------------------------------------------


Reply to: