public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mec at google dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/28277] __builtin_alloca with no limit in libstdc++
Date: Wed, 05 Jul 2006 22:21:00 -0000	[thread overview]
Message-ID: <20060705222059.31638.qmail@sourceware.org> (raw)
In-Reply-To: <bug-28277-11211@http.gcc.gnu.org/bugzilla/>



------- Comment #2 from mec at google dot com  2006-07-05 22:20 -------
Sure, here is a test program for versa_string:

// Copyright 2006, Google Inc.  All rights reserved.
// Author: mec@google.com  (Michael Chastain)
//
// Test operator<<(ostream&, const versa_string&)

#include <ext/vstring.h>
#include <iostream>

int main() {
  __gnu_cxx::__versa_string<
    char, std::char_traits<char>, std::allocator<char>
    > s("Hello world");
  std::cout << s << std::endl;
  std::cout.width(60);
  std::cout << s << std::endl;
  std::cout.width(6000);
  std::cout << s << std::endl;
  std::cout.width(60000000);
  std::cout << s << std::endl;
  return 0;
}

This program allocates 60 million bytes on the stack in the last output
statement.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28277


  parent reply	other threads:[~2006-07-05 22:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-05 20:57 [Bug libstdc++/28277] New: " mec at google dot com
2006-07-05 21:48 ` [Bug libstdc++/28277] " pcarlini at suse dot de
2006-07-05 22:21 ` mec at google dot com [this message]
2006-07-05 22:27   ` Andrew Pinski
2006-07-05 22:27 ` pinskia at physics dot uc dot edu
2006-07-05 22:32 ` pcarlini at suse dot de
2006-07-05 22:43 ` mec at google dot com
2006-07-05 22:48 ` pcarlini at suse dot de
2006-07-05 23:00 ` pcarlini at suse dot de
2006-07-05 23:00 ` pcarlini at suse dot de
2006-07-05 23:17 ` pcarlini at suse dot de
2006-07-08  9:45 ` pcarlini at suse dot de
2006-07-11 11:22 ` paolo at gcc dot gnu dot org
2006-07-15 20:31 ` paolo at gcc dot gnu dot org
2006-07-16 15:39 ` paolo at gcc dot gnu dot org
2006-10-08  1:13 ` paolo at gcc dot gnu dot org
2006-10-09 10:50 ` paolo at gcc dot gnu dot org
2006-10-09 18:04 ` paolo at gcc dot gnu dot org
2006-10-13  9:00 ` paolo at gcc dot gnu dot org
2007-04-09 21:36 ` pcarlini at suse dot de
2007-04-10 10:39 ` paolo at gcc dot gnu dot org
2007-04-12 23:07 ` paolo at gcc dot gnu dot org
     [not found] <bug-28277-4@http.gcc.gnu.org/bugzilla/>
2024-03-20  6:16 ` pinskia at gcc dot gnu.org
2024-03-20 11:21 ` redi at gcc dot gnu.org
2024-03-20 12:07 ` redi 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=20060705222059.31638.qmail@sourceware.org \
    --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).