在gdb下运行时,SSL_library_init会导致SIGILL [英] SSL_library_init cause SIGILL when running under gdb

查看:862
本文介绍了在gdb下运行时,SSL_library_init会导致SIGILL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用gdb调试程序,它无法在OPENSSL_cpuid_setup中报告SIGILL。

使用这个简单的代码,我有以下相同的行为:

Trying to debug a program using gdb, it fails reporting SIGILL in OPENSSL_cpuid_setup.
With this simple code I have the same behaviour with :

#include <openssl/ssl.h>
int main()
{
    SSL_library_init(); 
}

它编译和运行良好,但是从gdb报告开始,跟踪回溯

It compile and run well but starting with gdb report following backtrace

Program received signal SIGILL, Illegal instruction.
0xb6b2eb40 in ?? () from /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0
(gdb) where
#0  0xb6b2eb40 in ?? () from /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0
#1  0xb6b2b404 in OPENSSL_cpuid_setup () from /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0
#2  0xb6fdf058 in call_init (l=<optimized out>, argc=1, argv=0xbefff7d4, env=0xbefff7dc) at dl-init.c:78
#3  0xb6fdf134 in _dl_init (main_map=0xb6fff958, argc=1, argv=0xbefff7d4, env=0xbefff7dc) at dl-init.c:126
#4  0xb6fcfda4 in _dl_start_user () from /lib/ld-linux-armhf.so.3
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

如何运行这样的程序在gdb下?

How can I run such a program under gdb ?

推荐答案


SSL_library_init在gdb下运行时会导致SIGILL ... $ / b>

SSL_library_init cause SIGILL when running under gdb...

它实际上一直在做,而不仅仅是在GDB下。在库测试处理器功能时,这是启动代码中的正常行为。您可以通过发出 handle SIGILL nostop 来安全地忽略它。

It actually does it all the time, and not just under GDB. It is normal behavior in startup code as the library tests for processor features. You can safely ignore it by issuing handle SIGILL nostop.

有关更多详细信息,请参阅OpenSSL FAQ中的第17项: 在调试时,我在OpenSSL初始化过程中观察到SIGILL:为什么?

See item 17 in the OpenSSL FAQ for more details: When debugging I observe SIGILL during OpenSSL initialization: why?.

这篇关于在gdb下运行时,SSL_library_init会导致SIGILL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆