From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: gdb-patches@sourceware.org
Subject: [PATCH] Readline bug causes GDB crash on 64-bit
Date: Fri, 20 Oct 2006 21:10:00 -0000 [thread overview]
Message-ID: <200610202110.k9KLAiFL002481@d12av02.megacenter.de.ibm.com> (raw)
Hello,
GDB on s390x (64-bit) is crashing when you press ctrl-V.
This is because xmalloc is used without prototype in scope
in _rl_callback_data_alloc (readline/callback.c), and thus
the returned pointer is improperly truncated/extended.
Fixed by including "xmalloc.h". Tested on s390x-ibm-linux.
What's the policy for readline bugs in GDB? It is OK to check
this patch into GDB, or does it have to go upstream first?
(Where is readline upstream?)
Bye,
Ulrich
ChangeLog:
* callback.c: Include "xmalloc.h".
* Makefile.in: Add dependency.
Index: readline/Makefile.in
===================================================================
RCS file: /cvs/src/src/readline/Makefile.in,v
retrieving revision 1.7
diff -c -p -r1.7 Makefile.in
*** readline/Makefile.in 5 May 2006 18:26:12 -0000 1.7
--- readline/Makefile.in 20 Oct 2006 20:48:49 -0000
*************** util.o: rlprivate.h
*** 446,451 ****
--- 446,452 ----
vi_mode.o: rlprivate.h
bind.o: xmalloc.h
+ callback.o: xmalloc.h
complete.o: xmalloc.h
display.o: xmalloc.h
funmap.o: xmalloc.h
Index: readline/callback.c
===================================================================
RCS file: /cvs/src/src/readline/callback.c,v
retrieving revision 1.6
diff -c -p -r1.6 callback.c
*** readline/callback.c 5 May 2006 18:26:12 -0000 1.6
--- readline/callback.c 20 Oct 2006 20:48:49 -0000
***************
*** 43,48 ****
--- 43,49 ----
#include "rldefs.h"
#include "readline.h"
#include "rlprivate.h"
+ #include "xmalloc.h"
/* Private data for callback registration functions. See comments in
rl_callback_read_char for more details. */
--
Dr. Ulrich Weigand
Linux on zSeries Development
Ulrich.Weigand@de.ibm.com
next reply other threads:[~2006-10-20 21:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-20 21:10 Ulrich Weigand [this message]
2006-10-20 21:30 ` Andreas Schwab
2006-10-20 21:36 ` Daniel Jacobowitz
2006-10-20 21:32 ` Daniel Jacobowitz
2006-10-21 2:56 ` Chet Ramey
2006-10-21 5:15 ` Daniel Jacobowitz
2006-10-21 20:48 ` Ulrich Weigand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200610202110.k9KLAiFL002481@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox