public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-jankratochvil-misc: Revert "Fix completion memory double-free"
@ 2008-12-22 13:26 jkratoch
  0 siblings, 0 replies; only message in thread
From: jkratoch @ 2008-12-22 13:26 UTC (permalink / raw)
  To: archer-commits

The branch, archer-jankratochvil-misc has been updated
       via  6f19b1c2d34a9f9cd3725481a7e69a29941e8f71 (commit)
      from  3b73f5574b1b8ecb861069ef578afea59c6f5f64 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 6f19b1c2d34a9f9cd3725481a7e69a29941e8f71
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Dec 22 14:25:05 2008 +0100

    Revert "Fix completion memory double-free"
    
    This reverts commit 3587c81a2a2b17902139047e6024ab60e332aeb4.
    
    Committed upstream:
    http://sourceware.org/ml/gdb-patches/2008-12/msg00375.html
    http://sourceware.org/ml/gdb-cvs/2008-12/msg00104.html

-----------------------------------------------------------------------

Summary of changes:
 gdb/completer.c                       |    4 +---
 gdb/testsuite/gdb.base/completion.exp |   20 --------------------
 2 files changed, 1 insertions(+), 23 deletions(-)

First 500 lines of diff:
diff --git a/gdb/completer.c b/gdb/completer.c
index 4747a42..d109140 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -752,10 +752,8 @@ line_completion_function (const char *text, int matches,
       if (list)
 	{
 	  /* Free the storage used by LIST, but not by the strings inside.
-	     This is because rl_complete_internal () frees the strings.
-	     As complete_line may abort by calling `error' clear LIST now.  */
+	     This is because rl_complete_internal () frees the strings.  */
 	  xfree (list);
-	  list = NULL;
 	}
       index = 0;
       list = complete_line (text, line_buffer, point);
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index da3ac8e..d0d0dd6 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -805,26 +805,6 @@ gdb_expect  {
         timeout         { fail "(timeout) complete 'set follow-fork-mode'" }
         }
 
-send_gdb "p values\[0\].nonex.\t"
-sleep 1
-gdb_expect  {
-        -re "Type struct some_struct has no component named nonex.\r\n$gdb_prompt $"\
-            { pass "Completing non-existing component" }
-        -re ".*$gdb_prompt $"       { fail "Completing non-existing component" }
-        timeout         { fail "(timeout) Completing non-existing component" }
-        eof             { fail "(eof) Completing non-existing component #2" }
-        }
-# Double memory freeing gets found only on the second run:
-send_gdb "p values\[0\].nonex.\t"
-sleep 1
-gdb_expect  {
-        -re "Type struct some_struct has no component named nonex.\r\n$gdb_prompt $"\
-            { pass "Completing non-existing component #2" }
-        -re ".*$gdb_prompt $"       { fail "Completing non-existing component #2" }
-        timeout         { fail "(timeout) Completing non-existing component #2" }
-        eof             { fail "(eof) Completing non-existing component #2" }
-        }
-
 # Restore globals modified in this test...
 if [info exists old_inputrc] {
     set env(INPUTRC) $old_inputrc


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-12-22 13:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-22 13:26 [SCM] archer-jankratochvil-misc: Revert "Fix completion memory double-free" jkratoch

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).