public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-jankratochvil-python: Fix crashes on missing `lib*/pythonX.Y/encodings/'.
@ 2009-03-04 15:00 jkratoch
  0 siblings, 0 replies; only message in thread
From: jkratoch @ 2009-03-04 15:00 UTC (permalink / raw)
  To: archer-commits

The branch, archer-jankratochvil-python has been updated
       via  8376995d229ccbbec3d59897c511bdb35c9e0944 (commit)
       via  20fda2542b13b670951fcfcf9d89a13ca97b5bbb (commit)
       via  024b00ee6cb996b3d49e538352744d5af389cc0b (commit)
      from  b7d72995b3fb6e6ef1ca3d5cf33269dc523a561f (commit)

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

- Log -----------------------------------------------------------------
commit 8376995d229ccbbec3d59897c511bdb35c9e0944
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Mar 4 15:37:51 2009 +0100

    Fix crashes on missing `lib*/pythonX.Y/encodings/'.
    
    Due to bugs in rpm wrt arch-specific dependencies one can get python-libs
    without python rpm installed.  Thus `/usr/lib64/python2.5/encodings' may be
    missing.
    
    gdb/
    	Fix python crashes on missing `lib*/pythonX.Y/encodings/'.
    	* python/python-frame.c (frapy_read_var): Return on NULL VAR_NAME.
    	* python/python-value.c (valpy_binop): Use `break' to exit from the
    	TRY_CATCH block.  Do not call value_to_value_object on NULL RES_VAL.

commit 20fda2542b13b670951fcfcf9d89a13ca97b5bbb
Merge: b7d72995b3fb6e6ef1ca3d5cf33269dc523a561f 024b00ee6cb996b3d49e538352744d5af389cc0b
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Mar 4 14:31:33 2009 +0100

    Merge commit 'origin/archer-tromey-python' into archer-jankratochvil-python

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

Summary of changes:
 gdb/python/python-frame.c |    2 ++
 gdb/python/python-value.c |    6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

First 500 lines of diff:
diff --git a/gdb/python/python-frame.c b/gdb/python/python-frame.c
index c98dc39..c257ac3 100644
--- a/gdb/python/python-frame.c
+++ b/gdb/python/python-frame.c
@@ -418,6 +418,8 @@ frapy_read_var (PyObject *self, PyObject *args)
       volatile struct gdb_exception except;
 
       var_name = python_string_to_target_string (sym_obj);
+      if (!var_name)
+      	return NULL;
       cleanup = make_cleanup (xfree, var_name);
 
       TRY_CATCH (except, RETURN_MASK_ALL)
diff --git a/gdb/python/python-value.c b/gdb/python/python-value.c
index de54b9d..2507fcd 100644
--- a/gdb/python/python-value.c
+++ b/gdb/python/python-value.c
@@ -349,11 +349,11 @@ valpy_binop (enum valpy_opcode opcode, PyObject *self, PyObject *other)
 	 a gdb.Value object and need to convert it from python as well.  */
       arg1 = convert_value_from_python (self);
       if (arg1 == NULL)
-	return NULL;
+	break;
 
       arg2 = convert_value_from_python (other);
       if (arg2 == NULL)
-	return NULL;
+	break;
 
       switch (opcode)
 	{
@@ -430,7 +430,7 @@ valpy_binop (enum valpy_opcode opcode, PyObject *self, PyObject *other)
     }
   GDB_PY_HANDLE_EXCEPTION (except);
 
-  return value_to_value_object (res_val);
+  return res_val ? value_to_value_object (res_val) : NULL;
 }
 
 static PyObject *


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


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

only message in thread, other threads:[~2009-03-04 15:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-04 15:00 [SCM] archer-jankratochvil-python: Fix crashes on missing `lib*/pythonX.Y/encodings/' 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).