public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
From: sergiodj+buildbot@redhat.com
To: gdb-testers@sourceware.org
Subject: [binutils-gdb] gdb: New set/show max-value-size command.
Date: Mon, 01 Feb 2016 18:23:00 -0000	[thread overview]
Message-ID: <5fdf6324fafd60f967e2e8323fdacf84b1bfcea3@gdb-build> (raw)

*** TEST RESULTS FOR COMMIT 5fdf6324fafd60f967e2e8323fdacf84b1bfcea3 ***

Author: Andrew Burgess <andrew.burgess@embecosm.com>
Branch: master
Commit: 5fdf6324fafd60f967e2e8323fdacf84b1bfcea3

gdb: New set/show max-value-size command.

For languages with dynamic types, an incorrect program, or uninitialised
variables within a program, could result in an incorrect, overly large
type being associated with a value.  Currently, attempting to print such
a variable will result in gdb trying to allocate an overly large buffer.

If this large memory allocation fails then the result can be gdb either
terminating, or (due to memory contention) becoming unresponsive for the
user.

A new user visible variable in gdb helps guard against such problems,
two new commands are available:

   set max-value-size
   show max-value-size

The 'max-value-size' is the maximum size of memory in bytes that gdb
will allocate for the contents of a value.  Any attempt to allocate a
value with a size greater than this will result in an error.  The
initial default for this limit is set at 64k, this is based on a similar
limit that exists within the ada specific code.

It is possible for the user to set max-value-size to unlimited, in which
case the old behaviour is restored.

gdb/ChangeLog:

	* value.c (max_value_size): New variable.
	(MIN_VALUE_FOR_MAX_VALUE_SIZE): New define.
	(show_max_value_size): New function.
	(check_type_length_before_alloc): New function.
	(allocate_value_contents): Call check_type_length_before_alloc.
	(set_value_enclosing_type): Likewise.
	(_initialize_values): Add set/show handler for max-value-size.
	* NEWS: Mention new set/show command.

gdb/doc/ChangeLog:

	* gdb.texinfo (Value Sizes): New section.
	(Data): Add the 'Value Sizes' node to the menu.

gdb/testsuite/ChangeLog:

	* gdb.base/max-value-size.c: New file.
	* gdb.base/max-value-size.exp: New file.
	* gdb.base/huge.exp: Disable max-value-size for this test.


             reply	other threads:[~2016-02-01 18:23 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01 18:23 sergiodj+buildbot [this message]
2016-02-01 18:23 ` Failures on Fedora-i686, branch master sergiodj+buildbot
2016-02-01 18:23 ` Failures on Debian-s390x-native-gdbserver-m64, " sergiodj+buildbot
2016-02-01 18:25 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
2016-02-01 18:26 ` Failures on Fedora-x86_64-cc-with-index, " sergiodj+buildbot
2016-02-01 18:30 ` Failures on RHEL-s390x-m64, " sergiodj+buildbot
2016-02-01 18:32 ` Failures on Fedora-ppc64be-cc-with-index, " sergiodj+buildbot
2016-02-01 18:32 ` Failures on Debian-s390x-m64, " sergiodj+buildbot
2016-02-01 18:33 ` Failures on Debian-i686, " sergiodj+buildbot
2016-02-01 18:37 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-02-01 18:39 ` Failures on Debian-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-02-01 18:41 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2016-02-01 18:41 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+buildbot
2016-02-01 18:42 ` Failures on Fedora-x86_64-m64, " sergiodj+buildbot
2016-02-01 18:42 ` Failures on Fedora-s390x-m64, " sergiodj+buildbot
2016-02-01 18:49 ` Failures on AIX-POWER7-plain, " sergiodj+buildbot
2016-02-01 18:53 ` Failures on Fedora-ppc64be-m64, " sergiodj+buildbot
2016-02-01 18:54 ` Failures on Debian-i686-native-gdbserver, " sergiodj+buildbot
2016-02-01 18:58 ` Failures on Fedora-ppc64le-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-02-01 19:03 ` Failures on Debian-x86_64-m64, " sergiodj+buildbot
2016-02-01 19:08 ` Failures on Debian-s390x-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-02-01 19:13 ` Failures on Fedora-ppc64be-native-gdbserver-m64, " sergiodj+buildbot
2016-02-01 19:17 ` Failures on Fedora-ppc64le-cc-with-index, " sergiodj+buildbot
2016-02-01 19:20 ` Failures on Debian-i686-native-extended-gdbserver, " sergiodj+buildbot
2016-02-01 19:24 ` Failures on Debian-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2016-02-01 19:32 ` Failures on Fedora-ppc64le-native-gdbserver-m64, " sergiodj+buildbot
2016-02-01 19:33 ` Failures on Fedora-ppc64be-native-extended-gdbserver-m64, " sergiodj+buildbot
2016-02-01 19:51 ` Failures on Fedora-ppc64le-m64, " sergiodj+buildbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5fdf6324fafd60f967e2e8323fdacf84b1bfcea3@gdb-build \
    --to=sergiodj+buildbot@redhat.com \
    --cc=gdb-testers@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).