同样的问题Linux, AIX, HPUX测试都没有问题,solaris出core了。
SunOS Bug:
$ uname -a
SunOS solaris10 5.10 Generic_127127-11 sun4u sparc SUNW,Ultra-250
$ gcc -v
Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++,f77
Thread model: posix
gcc version 3.4.6
$
$ cat a.c
#include <stdio.h>
int main(int argc, char **argv)
{
char *p = NULL;
fprintf(stderr, "%s\n", p);
return (0);
}
$ gcc -Wall a.c
$ ./a.out
Segmentation Fault(coredump)
$ gdb ./a.out core
GNU gdb 6.6
Copyright (C) 2006 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 "sparc-sun-solaris2.10"...
(no debugging symbols found)
Reading symbols from /lib/libc.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.1
Reading symbols from /lib/ld.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/ld.so.1
Core was generated by `./a.out
Program terminated with signal 11, Segmentation fault. #0 0xff2b1d50 in strlen () from /lib/libc.so.1 (gdb) where #0 0xff2b1d50 in strlen () from /lib/libc.so.1 #1 0xff31a324 in _ndoprnt () from /lib/libc.so.1 #2 0xff31c334 in fprintf () from /lib/libc.so.1 #3 0x000106c8 in main ()
|
阅读(2433) | 评论(0) | 转发(0) |