public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/106874] [10/11/12/13 Regression] out of memory allocating 9223372036854453969 bytes after a total of 462848 bytes
Date: Thu, 08 Sep 2022 09:33:00 +0000 [thread overview]
Message-ID: <bug-106874-4-dpUqXv05ch@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106874-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106874
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-09-08
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm, with GCC 11 I see
> gcc-11 -c function_macro_file.c -traditional-cpp
function_macro_file.h:2:1: error: expected '=', ',', ';', 'asm' or
'__attribute__' at end of input
2 | f
| ^
I can confirm with GCC 10. Also with a dev build of GCC 11, but not 12.
Backtrace there:
#0 0x00007ffff6762c7e in exit () from /lib64/libc.so.6
#1 0x00000000021bd904 in xexit (code=1)
at ../../src/gcc-11-branch/libiberty/xexit.c:51
#2 0x00000000021bd9e4 in xmalloc_failed (size=9223372036854299649)
at ../../src/gcc-11-branch/libiberty/xmalloc.c:137
#3 0x00000000021bdaed in xrealloc (oldmem=0x32c9df0, size=9223372036854299649)
at ../../src/gcc-11-branch/libiberty/xmalloc.c:181
#4 0x000000000217459b in check_output_buffer (pfile=0x3245a80,
n=18446744073709234176) at ../../src/gcc-11-branch/libcpp/traditional.c:114
#5 0x0000000002174eb3 in _cpp_scan_out_logical_line (pfile=0x3245a80,
macro=0x0, builtin_macro_arg=false)
at ../../src/gcc-11-branch/libcpp/traditional.c:418
#6 0x0000000002174b4d in _cpp_read_logical_line_trad (pfile=0x3245a80)
at ../../src/gcc-11-branch/libcpp/traditional.c:321
#7 0x0000000000aff763 in scan_translation_unit_trad (pfile=0x3245a80)
at ../../src/gcc-11-branch/gcc/c-family/c-ppoutput.c:420
#8 0x0000000000afeb80 in preprocess_file (pfile=0x3245a80)
at ../../src/gcc-11-branch/gcc/c-family/c-ppoutput.c:97
#9 0x0000000000afcb25 in c_common_init ()
...
#4 0x000000000217459b in check_output_buffer (pfile=0x3245a80,
n=18446744073709234176) at ../../src/gcc-11-branch/libcpp/traditional.c:114
114 pfile->out.base = XRESIZEVEC (unsigned char, pfile->out.base,
new_size);
(gdb) l
109 if (n > (size_t) (pfile->out.limit - pfile->out.cur))
110 {
111 size_t size = pfile->out.cur - pfile->out.base;
112 size_t new_size = (size + n) * 3 / 2;
113
114 pfile->out.base = XRESIZEVEC (unsigned char, pfile->out.base,
new_size);
(gdb) up
#5 0x0000000002174eb3 in _cpp_scan_out_logical_line (pfile=0x3245a80,
macro=0x0, builtin_macro_arg=false)
at ../../src/gcc-11-branch/libcpp/traditional.c:418
418 check_output_buffer (pfile, RLIMIT (context) - cur);
(gdb) p *context
$2 = {next = 0x0, prev = 0x0, u = {iso = {first = {token = 0x32aa023,
ptoken = 0x32aa023}, last = {token = 0x325c820, ptoken = 0x325c820}},
trad = {cur = 0x32aa023 "\n\n", rlimit = 0x325c820 "\n"}}, buff = 0x0,
c = {mc = 0x0, macro = 0x0}, tokens_kind = TOKENS_KIND_INDIRECT}
next prev parent reply other threads:[~2022-09-08 9:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-07 17:16 [Bug c/106874] New: " gscfq@t-online.de
2022-09-08 9:33 ` rguenth at gcc dot gnu.org [this message]
2022-09-08 9:33 ` [Bug c/106874] " rguenth at gcc dot gnu.org
2022-09-08 21:17 ` [Bug preprocessor/106874] " pinskia at gcc dot gnu.org
2022-10-19 6:03 ` rguenth at gcc dot gnu.org
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=bug-106874-4-dpUqXv05ch@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.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).