gdb/gdb-bz568248-oom-is-error.patch

72 lines
2.1 KiB
Diff
Raw Normal View History

2018-03-09 16:46:37 +00:00
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-bz568248-oom-is-error.patch
2018-03-09 16:46:37 +00:00
;; Out of memory is just an error, not fatal (uninitialized VLS vars, BZ 568248).
;;=push+jan: Inferior objects should be read in parts, then this patch gets obsoleted.
http://sourceware.org/ml/gdb-patches/2010-06/msg00005.html
Hi,
unfortunately I see this problem reproducible only with the
archer-jankratochvil-vla branch (VLA = Variable Length Arrays - char[var]).
OTOH this branch I hopefully submit in some form for FSF GDB later.
In this case (a general problem but tested for example on Fedora 13 i686):
int
main (int argc, char **argv)
{
char a[argc];
return a[0];
}
(gdb) start
(gdb) print a
../../gdb/utils.c:1251: internal-error: virtual memory exhausted: can't allocate 4294951689 bytes.
It is apparently because boundary for the variable `a' is not initialized
there. Users notice it due to Eclipse-CDT trying to automatically display all
the local variables on each step.
Apparentl no regressions on {x86_64,x86_64-m32,i686}-fedora13-linux-gnu.
But is anone aware of the reasons to use internal_error there?
I find simple error as a perfectly reasonable there.
(history only tracks it since the initial import)
IIRC this idea has been discussed with Tom Tromey, not sure of its origin.
I understand it may be offtopic for FSF GDB but from some GDB crashes I am not
sure if it can happen only due to the VLA variables.
Thanks,
Jan
gdb/
2010-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
Tom Tromey <tromey@redhat.com>
* utils.c (nomem): Change internal_error to error.
2018-03-09 16:46:37 +00:00
diff --git a/gdb/utils.c b/gdb/utils.c
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -746,13 +746,11 @@ malloc_failure (long size)
{
if (size > 0)
Accepting request 125095 from devel:gcc - Merge from gdb-7.4.50.20120603-3.fc18.src.rpm. * Wed Jun 6 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120603-3.fc18 - Disable -lmcheck in the development builds. - Fix assertion on some files as glibc-2.15.90-8.fc18 (Doug Evans). * Sun Jun 3 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120603-2.fc18 - Fix Release. - Make yum --enablerepo compatible with at least mock-1.1.21-1.fc16 Rawhide cfg. * Sun Jun 3 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120602-1.fc18 - Rebase to FSF GDB 7.4.50.20120602. - [testsuite] BuildRequire gcc-go. - Drop printing 2D C++ vectors as matrices which no longer worked (BZ 562763). - Fix dejagnu-1.5-4.fc17 compatibility for Go (for BZ 635651). - Use librpm.so.3 for rpm-4.10.0 in Fedora 18. - Revert recent breakage of UNIX objfiles order for symbols lookup. * Sat Jun 2 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-48.fc17 - [ppc] Fix hardware watchpoints on PowerPC (BZ 827600, Edjunior Machado). * Mon May 28 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-47.fc17 - Workaround PR libc/14166 for inferior calls of strstr. * Mon May 14 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-46.fc17 - [RHEL5] Workaround doc build race. * Mon May 14 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-45.fc17 - Rename "set auto-load" patchset variable $ddir to $datadir. * Wed May 9 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-44.fc17 OBS-URL: https://build.opensuse.org/request/show/125095 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdb?expand=0&rev=88
2012-06-16 04:55:29 +00:00
{
- internal_error (__FILE__, __LINE__,
- _("virtual memory exhausted: can't allocate %ld bytes."),
- size);
Accepting request 125095 from devel:gcc - Merge from gdb-7.4.50.20120603-3.fc18.src.rpm. * Wed Jun 6 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120603-3.fc18 - Disable -lmcheck in the development builds. - Fix assertion on some files as glibc-2.15.90-8.fc18 (Doug Evans). * Sun Jun 3 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120603-2.fc18 - Fix Release. - Make yum --enablerepo compatible with at least mock-1.1.21-1.fc16 Rawhide cfg. * Sun Jun 3 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120602-1.fc18 - Rebase to FSF GDB 7.4.50.20120602. - [testsuite] BuildRequire gcc-go. - Drop printing 2D C++ vectors as matrices which no longer worked (BZ 562763). - Fix dejagnu-1.5-4.fc17 compatibility for Go (for BZ 635651). - Use librpm.so.3 for rpm-4.10.0 in Fedora 18. - Revert recent breakage of UNIX objfiles order for symbols lookup. * Sat Jun 2 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-48.fc17 - [ppc] Fix hardware watchpoints on PowerPC (BZ 827600, Edjunior Machado). * Mon May 28 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-47.fc17 - Workaround PR libc/14166 for inferior calls of strstr. * Mon May 14 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-46.fc17 - [RHEL5] Workaround doc build race. * Mon May 14 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-45.fc17 - Rename "set auto-load" patchset variable $ddir to $datadir. * Wed May 9 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-44.fc17 OBS-URL: https://build.opensuse.org/request/show/125095 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdb?expand=0&rev=88
2012-06-16 04:55:29 +00:00
+ error (_("virtual memory exhausted: can't allocate %ld bytes."), size);
}
else
Accepting request 125095 from devel:gcc - Merge from gdb-7.4.50.20120603-3.fc18.src.rpm. * Wed Jun 6 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120603-3.fc18 - Disable -lmcheck in the development builds. - Fix assertion on some files as glibc-2.15.90-8.fc18 (Doug Evans). * Sun Jun 3 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120603-2.fc18 - Fix Release. - Make yum --enablerepo compatible with at least mock-1.1.21-1.fc16 Rawhide cfg. * Sun Jun 3 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120602-1.fc18 - Rebase to FSF GDB 7.4.50.20120602. - [testsuite] BuildRequire gcc-go. - Drop printing 2D C++ vectors as matrices which no longer worked (BZ 562763). - Fix dejagnu-1.5-4.fc17 compatibility for Go (for BZ 635651). - Use librpm.so.3 for rpm-4.10.0 in Fedora 18. - Revert recent breakage of UNIX objfiles order for symbols lookup. * Sat Jun 2 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-48.fc17 - [ppc] Fix hardware watchpoints on PowerPC (BZ 827600, Edjunior Machado). * Mon May 28 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-47.fc17 - Workaround PR libc/14166 for inferior calls of strstr. * Mon May 14 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-46.fc17 - [RHEL5] Workaround doc build race. * Mon May 14 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-45.fc17 - Rename "set auto-load" patchset variable $ddir to $datadir. * Wed May 9 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-44.fc17 OBS-URL: https://build.opensuse.org/request/show/125095 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdb?expand=0&rev=88
2012-06-16 04:55:29 +00:00
{
- internal_error (__FILE__, __LINE__, _("virtual memory exhausted."));
Accepting request 125095 from devel:gcc - Merge from gdb-7.4.50.20120603-3.fc18.src.rpm. * Wed Jun 6 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120603-3.fc18 - Disable -lmcheck in the development builds. - Fix assertion on some files as glibc-2.15.90-8.fc18 (Doug Evans). * Sun Jun 3 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120603-2.fc18 - Fix Release. - Make yum --enablerepo compatible with at least mock-1.1.21-1.fc16 Rawhide cfg. * Sun Jun 3 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120602-1.fc18 - Rebase to FSF GDB 7.4.50.20120602. - [testsuite] BuildRequire gcc-go. - Drop printing 2D C++ vectors as matrices which no longer worked (BZ 562763). - Fix dejagnu-1.5-4.fc17 compatibility for Go (for BZ 635651). - Use librpm.so.3 for rpm-4.10.0 in Fedora 18. - Revert recent breakage of UNIX objfiles order for symbols lookup. * Sat Jun 2 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-48.fc17 - [ppc] Fix hardware watchpoints on PowerPC (BZ 827600, Edjunior Machado). * Mon May 28 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-47.fc17 - Workaround PR libc/14166 for inferior calls of strstr. * Mon May 14 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-46.fc17 - [RHEL5] Workaround doc build race. * Mon May 14 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-45.fc17 - Rename "set auto-load" patchset variable $ddir to $datadir. * Wed May 9 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-44.fc17 OBS-URL: https://build.opensuse.org/request/show/125095 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gdb?expand=0&rev=88
2012-06-16 04:55:29 +00:00
+ error (_("virtual memory exhausted."));
}
}