public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug cli/15642] New: Crash using 'rbreak'
@ 2013-06-18 8:56 vgiraud at neotion dot com
2013-06-18 10:19 ` [Bug cli/15642] " vgiraud at neotion dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: vgiraud at neotion dot com @ 2013-06-18 8:56 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15642
Bug ID: 15642
Summary: Crash using 'rbreak'
Product: gdb
Version: 7.6
Status: NEW
Severity: minor
Priority: P2
Component: cli
Assignee: unassigned at sourceware dot org
Reporter: vgiraud at neotion dot com
Hi all,
I've found something strange trying to use 'rbreak'
I instantanetly get a segfault. A bt bring me in gdb code, here :
jimregexp.c:1021
static int regtry( regex_t *preg, const char *string )
{
int i;
preg->reginput = string;
for (i = 0; i < preg->nmatch; i++) {
preg->pmatch[i].rm_so = -1;
preg->pmatch[i].rm_eo = -1;
}
if (regmatch(preg, 1)) {
preg->pmatch[0].rm_so = string - preg->start;
preg->pmatch[0].rm_eo = preg->reginput - preg->start; // It crash here
!!!
return(1);
} else
return(0);
}
If I go back I see that the problem may come from here :
symtab.c:3386
static int
search_symbols_name_matches (const char *symname, void *user_data)
{
struct search_symbols_data *data = user_data;
return !data->preg_p || regexec (&data->preg, symname, 0, NULL, 0) == 0;
}
Signature of regexec :
int regexec(regex_t *preg, const char *string, size_t nmatch, regmatch_t
pmatch[], int eflags)
Why NULL ?? It's clear that if pmatch is NULL preg->pmatch[0].rm_eo =
preg->reginput - preg->start; can't work !
I only load an .elf and type rbreak 1. I know it's not like that it work, but
it should not segfault.
Vivien !
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug cli/15642] Crash using 'rbreak'
2013-06-18 8:56 [Bug cli/15642] New: Crash using 'rbreak' vgiraud at neotion dot com
@ 2013-06-18 10:19 ` vgiraud at neotion dot com
2013-06-18 14:00 ` tromey at redhat dot com
2022-12-05 2:57 ` tromey at sourceware dot org
2 siblings, 0 replies; 4+ messages in thread
From: vgiraud at neotion dot com @ 2013-06-18 10:19 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15642
Vivien Giraud <vgiraud at neotion dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vgiraud at neotion dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug cli/15642] Crash using 'rbreak'
2013-06-18 8:56 [Bug cli/15642] New: Crash using 'rbreak' vgiraud at neotion dot com
2013-06-18 10:19 ` [Bug cli/15642] " vgiraud at neotion dot com
@ 2013-06-18 14:00 ` tromey at redhat dot com
2022-12-05 2:57 ` tromey at sourceware dot org
2 siblings, 0 replies; 4+ messages in thread
From: tromey at redhat dot com @ 2013-06-18 14:00 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15642
Tom Tromey <tromey at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
CC| |tromey at redhat dot com
--- Comment #1 from Tom Tromey <tromey at redhat dot com> ---
I think this is a bug in your host OS's C library; or at least in
"jimregexp.c", whatever that is.
According to POSIX, it is ok to pass NULL as this argument for regexec
as long as REG_NOSUB was used when initializing the regex_t. And, I
think this is properly done. See symtab.c:search_symbols.
However, something else odd is going on here. I think the libiberty
regex.c should always be used. I wonder why that isn't happening for
you. You can look at the libiberty directory in the build tree to try
to find out.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug cli/15642] Crash using 'rbreak'
2013-06-18 8:56 [Bug cli/15642] New: Crash using 'rbreak' vgiraud at neotion dot com
2013-06-18 10:19 ` [Bug cli/15642] " vgiraud at neotion dot com
2013-06-18 14:00 ` tromey at redhat dot com
@ 2022-12-05 2:57 ` tromey at sourceware dot org
2 siblings, 0 replies; 4+ messages in thread
From: tromey at sourceware dot org @ 2022-12-05 2:57 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=15642
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
CC| |tromey at sourceware dot org
Status|WAITING |RESOLVED
--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
Years without a response.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-12-05 2:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-18 8:56 [Bug cli/15642] New: Crash using 'rbreak' vgiraud at neotion dot com
2013-06-18 10:19 ` [Bug cli/15642] " vgiraud at neotion dot com
2013-06-18 14:00 ` tromey at redhat dot com
2022-12-05 2:57 ` tromey at sourceware dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).