Discussion:
[Bug python/17284] New: template_argument doesn't check for negative argno
dje at google dot com
2014-08-17 18:18:38 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=17284

Bug ID: 17284
Summary: template_argument doesn't check for negative argno
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: python
Assignee: unassigned at sourceware dot org
Reporter: dje at google dot com

py-type.c:typy_template_argument does not check for negative values of argno.

repro: take a binary built by py-template.exp, and do
(gdb) python print foo.type.template_argument(-1)
-> SEGV (or whatever)
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-15 01:00:48 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=17284

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org
Assignee|unassigned at sourceware dot org |tromey at sourceware dot org
--
You are receiving this mail because:
You are on the CC list for the bug.
cvs-commit at gcc dot gnu.org
2018-09-24 05:17:14 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=17284

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <***@sourceware.org>:

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

commit fd3ba736db19d4c7cd928f3735329339a8c8ef47
Author: Tom Tromey <***@tromey.com>
Date: Sat Sep 15 00:29:20 2018 -0600

Check for negative argument in Type.template_argument

typy_template_argument did not check if the template argument was
non-negative. A negative value could cause a gdb crash.

2018-09-23 Tom Tromey <***@tromey.com>

PR python/17284:
* python/py-type.c (typy_template_argument): Check for negative
argument number.

gdb/testsuite/ChangeLog
2018-09-23 Tom Tromey <***@tromey.com>

PR python/17284:
* gdb.python/py-template.exp (test_template_arg): Add test for
negative template argument number.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-23 23:49:15 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=17284

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |8.3

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
Fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...