Re: Curious segmentation fault...

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

 



Monday 22 May 2006 23:05 samaye, Shriramana Sharma alekhiit:

> The only difference between the two source files monthpan.c and
> monthpan-bug.c is that the latter contains the line:
> char spicanaama[] = "Spica";
> *before* the start of the declarations of the two-dimensional arrays, which
> for some reason seems to cause the zero element of the first
> two-dimensional array to be out-of-bounds.

I further investigated this and it becomes more and more curious. 

If I place spica-name before graha-name then it faults, but not if I place it 
before tithi-name. If I push it to before nakshatra-name it faults again, but 
does not fault before yoga-name, and again faults before karana-name but does 
not fault *after* karana-name. 

In all the cases, it is memory location 0x726956 which faults with <Address 
0x726956 out of bounds> ...

-- 

Tux #395953 resides at http://samvit.org
playing with KDE 3.51 on SUSE Linux 10.1
$ date [] CCE +2006-05-22 W21-1 UTC+0530

Attachment: pgp2m5MO6nGCj.pgp
Description: PGP signature


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux