Hi all It has been four days that I try to port a C program that runs perfectly on SGI station (MIPS R12000 processor) to Linux (RH7.1 on dual PIII box). Since I failed to find the answer (to the question following) on the net, and before starting reading the code(about 900 lines), I decided to try this forum. If you think it's offtopic or annoying, please ingnore this message
Well, the problem is: I'm porting a program that runs perfecly on SGI station (R12000 processor). I've copied all the sources, headers, custom libraries (there were two of them) and the Makefile. There were some troubles with pointer initiations, but I managed to overcome them. In some point, when main() calls a function called search(...) which is in search.c file, the program crushes upon the first line. Electric Fence (with all possible options) did not found any problem before search() is called. It's worth to note that the entire program has only one malloc and no free(). Some more details: Compiler used on R1200: MIPSpro Compilers: Version 7.2.1 On linux : gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81) with -ggdb option and no optimization Here is the output of the core examination by gdb (the binary compiled by cc with -ggdb flag). ------------------------------------ Segmentation fault (core dumped) [bgbg:13:13:08 sc]$ gdb scwrl core GNU gdb 5.0rh-5 Red Hat Linux 7.1 Copyright 2001 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux"... Core was generated by `./scwrl -i pdb10.pdb -o pdb_out.pdb'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/lib/libefence.so.0...done. Loaded symbols for /usr/lib/libefence.so.0 Reading symbols from /lib/i686/libm.so.6...done. Loaded symbols for /lib/i686/libm.so.6 Reading symbols from /lib/i686/libc.so.6...done. Loaded symbols for /lib/i686/libc.so.6 Reading symbols from /lib/i686/libpthread.so.0...done. warning: Unable to set global thread event mask: generic error [New Thread 1024 (LWP 6783)] Error while reading shared library symbols: Cannot enable thread event reporting for Thread 1024 (LWP 6783): generic error Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 #0 find_lowest () at search.c:174 174 bg=5; (gdb) where #0 find_lowest () at search.c:174 #1 0x08049fbb in main (argc=5, argv=0xbffff74c) at main.c:483 #2 0x40073177 in __libc_start_main (main=0x8048eb0 <main>, argc=5, ubp_av=0xbffff74c, init=0x8048af0 <_init>, fini=0x807d240 <_fini>, rtld_fini=0x4000d3c4 <_dl_fini>, stack_end=0xbffff73c) at ../sysdeps/generic/libc-start.c:129 (gdb) ------------------------ thanks a lot ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]