views:

23

answers:

1

Hi!

I use MinGW-5.1.6 and MSYS-1.0.11 to build a static libgmp, and then to build some custom libs and programs which use libgmp. Both gmp and the custom things are built using C(XX)FLAGS="-g -ggdb" ./configure. Gmp's make check runs fine. Everything is statically linked (same effect was seen on dynamic linked libgmp).

Now when trying to run a custom program with some input files, it gets this segfault (without input it just prints the usage fine).

Program received signal SIGSEGV, Segmentation fault.
0x00435723 in probe ()
(gdb)

Now I don't know if gmp has anything to do with this. I would need some pointers, mostly because I can't find what "probe" is and where to start. Practically many thing could get wrong but I don't have any hints.

Thanks!

A: 

I found out that the segfault occured when trying to create an array of negative length (well, actually the length was a variable which was left uninitalized but managed to survive different kind of systems and compilers with zero value.. until now).

ron