help-gsl
[Top][All Lists]
Advanced

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

[Help-gsl] Segmentation fault with gsl_vector_alloc


From: notinh notien
Subject: [Help-gsl] Segmentation fault with gsl_vector_alloc
Date: Tue, 01 Feb 2005 10:40:55 +0700

In regard with the previous email about gsl_vector_alloc's segmentation fault. I am currently using gsl-1.6, g++ (gcc) 3.3.3-7 (Redhat FC 2)

So I decided to step into gsl to see if the error is mine or ....

Breakpoint 1, setupFitting () at main.cpp:574
574           gsl_vector *x = gsl_vector_alloc(6);
(gdb) s
gsl_vector_alloc (n=6) at init_source.c:26
26        if (n == 0)
Current language:  auto; currently c
(gdb) print n
$1 = 6
(gdb) s
32        v = (TYPE (gsl_vector) *) malloc (sizeof (TYPE (gsl_vector)));
(gdb) print v
$2 = (gsl_vector *) 0x9f31388
(gdb) s
Program received signal SIGSEGV, Segmentation fault.
0x08106692 in _int_malloc ()
(gdb) bt
#0  0x08106692 in _int_malloc ()
#1  0x08106019 in malloc ()
#2  0x0806db02 in gsl_vector_alloc (n=20) at init_source.c:32
#3  0x0804b38f in setupFitting () at main.cpp:574
#4  0xbf8446f8 in ?? ()
#5  0x10410410 in ?? ()
#6  0xbf804104 in ?? ()
#7  0xb2219729 in ?? ()
#8  0xbf786dee in ?? ()
#9  0xb9d08959 in ?? ()
#10 0xbf8c46b0 in ?? ()
#11 0x8faf0d27 in ?? ()
#12 0xbf8848da in ?? ()
#13 0x6562d9fb in ?? ()
#14 0xbf8446f8 in ?? ()
#15 0x10410410 in ?? ()
#16 0xbf804104 in ?? ()
#17 0xb2219729 in ?? ()
#18 0xbf786dee in ?? ()
#19 0xf7d73405 in ?? ()
#20 0xbf705197 in ?? ()
#21 0x8faf0d27 in ?? ()
#22 0xbf8848da in ?? ()
#23 0x6562d9fb in ?? ()
#24 0xbf8446f8 in ?? ()
#25 0x10410410 in ?? ()
#26 0xbf804104 in ?? ()
#27 0xb2219729 in ?? ()
#28 0xbf786dee in ?? ()
#29 0xf7d73405 in ?? ()
#30 0xbf705197 in ?? ()
#31 0xa0727586 in ?? ()
#32 0xbf6059ee in ?? ()
#33 0x6562d9fb in ?? ()
#34 0xbf8446f8 in ?? ()
#35 0x10410410 in ?? ()
#36 0xbf804104 in ?? ()       <<this is start of my main I believe
#37 0xb2219729 in ?? ()
#38 0xbf786dee in ?? ()
#39 0xf7d73405 in ?? ()
#40 0xbf705197 in ?? ()
#41 0xa0727586 in ?? ()
#42 0xbf6059ee in ?? ()
#43 0x00000000 in ?? ()

Btw, I found it is a bit weird to have such a long run stacks like this because I was trying to run through this loop 4 times. However, right at the first run (I know the first run because I printed out some results only once) I got this seg fault.

Thanks once again for all your help.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]