libc.so.1 中的核心

标签 c unix solaris core libc

我正在使用 Solaris 10,我的 C 程序崩溃并创建了一个核心文件。在调试时,似乎核心是在 libc.so.1 中创建的。如果有人有任何线索,请告诉我。 以下是 dbx 报告。

dbx prock.new core
For information about new features see `help changes'
To remove this message, put `dbxenv suppress_startup_message 7.6' in your .dbxrc
Reading prock.new
core file header read successfully
Reading ld.so.1
Reading libsocket.so.1
Reading libnsl.so.1
Reading libl.so.1
Reading libpthread.so.1
Reading librt.so.1
Reading libthread.so.1
Reading libc.so.1
Reading libaio.so.1
Reading libmd.so.1
Reading libc_psr.so.1
WARNING!!
A loadobject was found with an unexpected checksum value.
See `help core mismatch' for details, and run `proc -map'
to see what checksum values were expected and found.
dbx: warning: Some symbolic information might be incorrect.
t@null (l@1) terminated by signal SEGV (no mapping at the fault address)
0xffffffff7ea3bc14: strcasecmp+0x0134:  orn      %i0, %i3, %i0
(dbx) where
=>[1] strcasecmp(0x10014b68e, 0x57, 0x7ffffc00, 0x1001332d7, 0x27, 0x24), at 0xffffffff7ea3bc14
  [2] 0x10000af48(0x27, 0x10014b68e, 0x57, 0x10014b68e, 0x57, 0x0), at 0x10000af48
  [3] 0x100009c08(0x27, 0x5e, 0x0, 0x9, 0x1001332c3, 0x2b), at 0x100009c08

(dbx) whereis strcasecmp
function:       `libc.so.1`strcasecmp
(dbx)

我的solaris版本是

               Solaris 10 8/07 s10s_u4wos_12b SPARC
   Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
                Use is subject to license terms.
                    Assembled 16 August 2007

最佳答案

不,问题不在于 C 标准库。您将无效参数(NULL 字符串指针等)传递给 strcasecmp()。如果没有实际代码(您尚未发布),则无法推断出错误到底是什么。

(此外,您最好使用调试符号编译您的程序 - 关闭优化!如果您在 Solaris 上,您很可能使用 GCC:

gcc -O0 -g etc...

)

关于libc.so.1 中的核心,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11760688/

相关文章:

perl - 从使用 Perl 创建的 Excel 2007 文件中读取标题行时出现问题

c++ - 在 Linux 上的发布/优化二进制文件中的信号处理程序中打印回溯

c++ - 了解 fork

macos - 操作系统 X : equivalent of Linux's wget

linux - 需要帮助编辑脚本

c - 什么会导致 fwrite 挂起?

python - 在 Solaris 10 上安装 web2py : "ImportError: No module named _md5"

c - 编写自定义 IRB

asp.net - 通过Ajax向 Controller 发送数据

C 中的 Const 返回类型