Summary: | gdb segfaults on uclibc | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | René Rhéaume (a.k.a. repzilon, rener) <rene.rheaume> |
Component: | [OLD] Core system | Assignee: | Embedded Gentoo Team <embedded> |
Status: | RESOLVED NEEDINFO | ||
Severity: | critical | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Patch used to find the source of the bug |
Description
René Rhéaume (a.k.a. repzilon, rener)
2005-10-08 07:11:34 UTC
works fine on my uclibc we need something to reproduce this > we need something to reproduce this
More exactly what?
some example source code would be helpful :P I got new information this weekend. First, the ioctl system calls with a bogus file handle are not the source of the problem. Second, I pinpointed the source of the crash to be rl_reset_terminal (NULL);, used by init_page_info in gdb/utils.c, circa line 1670. I do not know whether GDB uses the system readline or its own copy. As I cannot get a usable backtrace using my working GDB on my half-Mandr* 9.0 system from my 37MB broken gdb and a corresponding core dump, I had to resort to the good-old printf technique. By the way, ioctl with bogus handle is called from initialize_targets() (directly or indirectly). gdb_init() calls initialize_targets(). Created attachment 71736 [details, diff]
Patch used to find the source of the bug
I used the printf technique (in fact, I do fprintf(stderr, "message\n")), going
deeper at each step. The attached patch is the 4th version. When I run gdb with
this patch applied, I get this:
captured_main: start
captured_main: after variables
captured_main: after i18n
captured_main: after variables 2
captured_main: after error_init()
captured_main: after setting sysroot path
captured_main: after argument parsing
gdb_init: start
gdb_init: after pre_init_ui_hook()
gdb_init: after getting current directory
gdb_init: after init_cmd_lists()
gdb_init: after initialize_targets()
initialize_utils: start
initialize_utils: after setting width
initialize_utils: after setting height
init_page_info: start
init_page_info: inside block
init_page_info: before readline code
Segmentation fault (core dumped)
To try it, simply add an epatch to the gdb ebuild and emerge gdb.
(In reply to comment #3) > some example source code would be helpful :P > Closing as NEEDINFO. We need a testcase. |