This is the mail archive of the archer@sourceware.org mailing list for the Archer 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]

[patch] Do not allow invalid subscript operations on GDB values


This patches attempts to fix the discussion regarding invalid subscripts referenced here:

http://permalink.gmane.org/gmane.comp.gdb.devel/26807

This patch checks the value type before allowing a subscript operation to proceed. It also adds some regressions and general tests for value subscripts.

This patch was tested on x86-64, and causes no regressions.

OK?

Regards

Phil


ChangeLog


2009-09-15 Phil Muldoon <pmuldoon@redhat.com>

    * py-value.c (valpy_getitem): Test value before allowing subscript
    operation.

Testsuite ChangeLog

2009-09-15 Phil Muldoon <pmuldoon@redhat.com>

    * gdb.python/py-value.exp (test_subscript_regression): New
    function.  Test for invalid subscripts.
    * gdb.python/py-value.c (main): Add test array, and pointer to it.

Attachment: py_subscript.patch
Description: Text document


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