public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug exp/12347] New: Scripted strcmp() returns incorrect, constant value
@ 2010-12-27 1:09 twists at gmail dot com
2010-12-27 8:43 ` [Bug exp/12347] " twists at gmail dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: twists at gmail dot com @ 2010-12-27 1:09 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12347
Summary: Scripted strcmp() returns incorrect, constant value
Product: gdb
Version: unknown
Status: NEW
Severity: normal
Priority: P2
Component: exp
AssignedTo: unassigned@sourceware.org
ReportedBy: twists@gmail.com
Created attachment 5165
--> http://sourceware.org/bugzilla/attachment.cgi?id=5165
repro test case
The glibc function strchr() is returning a constant nonsense value when used by
gdb.
The original test case:
perl -e 'system "gdb -p $$"'
(gdb) set print pretty on
(gdb) p $patchlevel_sv = *PL_patchlevel
$1 = {
sv_any = 0x9199030,
sv_refcnt = 1,
sv_flags = 17412,
sv_u = {
svu_pv = 0x919fe98 "v5.12.2",
svu_iv = 152698520,
svu_uv = 152698520,
svu_rv = 0x919fe98,
svu_array = 0x919fe98,
svu_hash = 0x919fe98,
svu_gp = 0x919fe98
}
}
(gdb) p $patchlevel = $patchlevel_sv->sv_u.svu_pv
$2 = 0x919fe98 "v5.12.2"
(gdb) p strcmp($patchlevel, "v5.10")
$3 = 3998896
(gdb) p strcmp($patchlevel, "v5.12")
$4 = 3998896
An automated, minimal test is attached in gdb-strcmp-repro.tar.gz:
tar xzf gdb-strcmp-repro.tar.gz
cd gdb-strcmp-repro
make
The internet complaint at
http://old.nabble.com/call-strcmp-tt28828726.html#a28828726 might also be an
instance of this.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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 exp/12347] Scripted strcmp() returns incorrect, constant value
2010-12-27 1:09 [Bug exp/12347] New: Scripted strcmp() returns incorrect, constant value twists at gmail dot com
@ 2010-12-27 8:43 ` twists at gmail dot com
2010-12-28 6:42 ` schwab@linux-m68k.org
2011-06-02 13:18 ` jan.kratochvil at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: twists at gmail dot com @ 2010-12-27 8:43 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12347
--- Comment #1 from Josh Jore <twists at gmail dot com> 2010-12-27 01:09:37 UTC ---
I'm using version 7.2-1ubuntu3 as provided by the Ubuntu package repository.
Also fails when I build the latest CVS rev.
$ gdb -v
GNU gdb (GDB) 7.2-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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 exp/12347] Scripted strcmp() returns incorrect, constant value
2010-12-27 1:09 [Bug exp/12347] New: Scripted strcmp() returns incorrect, constant value twists at gmail dot com
2010-12-27 8:43 ` [Bug exp/12347] " twists at gmail dot com
@ 2010-12-28 6:42 ` schwab@linux-m68k.org
2011-06-02 13:18 ` jan.kratochvil at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: schwab@linux-m68k.org @ 2010-12-28 6:42 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12347
--- Comment #2 from Andreas Schwab <schwab@linux-m68k.org> 2010-12-27 08:42:52 UTC ---
strcmp is the IFUNC symbol.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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 exp/12347] Scripted strcmp() returns incorrect, constant value
2010-12-27 1:09 [Bug exp/12347] New: Scripted strcmp() returns incorrect, constant value twists at gmail dot com
2010-12-27 8:43 ` [Bug exp/12347] " twists at gmail dot com
2010-12-28 6:42 ` schwab@linux-m68k.org
@ 2011-06-02 13:18 ` jan.kratochvil at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-06-02 13:18 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12347
Jan Kratochvil <jan.kratochvil at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |jan.kratochvil at redhat
| |dot com
Resolution| |FIXED
Target Milestone|--- |7.3
--- Comment #3 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2011-06-02 13:17:20 UTC ---
This is fixed in FSF GDB HEAD and GDB 7.3-prerelease branch.
[patch 0/7] STT_GNU_IFUNC support
http://sourceware.org/ml/gdb-patches/2011-03/msg00937.html
You can download a GDB snapshot before gdb-7.3 gets released these days/weeks.
http://www.gnu.org/software/gdb/current/
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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:[~2011-06-02 13:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-27 1:09 [Bug exp/12347] New: Scripted strcmp() returns incorrect, constant value twists at gmail dot com
2010-12-27 8:43 ` [Bug exp/12347] " twists at gmail dot com
2010-12-28 6:42 ` schwab@linux-m68k.org
2011-06-02 13:18 ` jan.kratochvil at redhat dot com
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).