This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Fix crash in Ada "catch exception"


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d42076962798cd2329090cea213e797f4c69c03c

commit d42076962798cd2329090cea213e797f4c69c03c
Author: Tom Tromey <tromey@adacore.com>
Date:   Fri Sep 20 11:34:21 2019 -0600

    Fix crash in Ada "catch exception"
    
    PR ada/24919 concerns a crash that Tom de Vries noticed when running
    the "catch_ex" Ada test case.  He sent a test executable and tracked
    this down to commit f21c2bd7b7 ("Fix Fortran regression with variables
    in nested functions").
    
    Looking at that patch, you can see the obvious error:
    
        -  return 0;
        +  return true;
    
    Oops!  This patch fixes the bug.
    
    Tested on x86-64 Fedora 29.
    
    gdb/ChangeLog
    2019-09-20  Tom Tromey  <tromey@adacore.com>
    
    	PR ada/24919:
    	* block.c (contained_in): Fix final return value.

Diff:
---
 gdb/ChangeLog | 5 +++++
 gdb/block.c   | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5314b27..b1c4db8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2019-09-20  Tom Tromey  <tromey@adacore.com>
+
+	PR ada/24919:
+	* block.c (contained_in): Fix final return value.
+
 2019-09-20  Alan Modra  <amodra@gmail.com>
 
 	* gdb_bfd.c (gdb_bfd_ref, gdb_bfd_unref): Use bfd_set_usrdata.
diff --git a/gdb/block.c b/gdb/block.c
index ca4dc22..5ba44d4 100644
--- a/gdb/block.c
+++ b/gdb/block.c
@@ -86,7 +86,7 @@ contained_in (const struct block *a, const struct block *b,
     }
   while (a != NULL);
 
-  return true;
+  return false;
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]