public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "aklauer at rumms dot uni-mannheim.de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/45779] pointer difference error/ptrdiff_t representability Date: Mon, 27 Sep 2010 18:27:00 -0000 [thread overview] Message-ID: <20100927182700.qdhEY5zs29juaeQFavUE7i3qaa1Gd1BrpswKW6jKC6Y@z> (raw) In-Reply-To: <bug-45779-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45779 --- Comment #1 from Alexander <aklauer at rumms dot uni-mannheim.de> 2010-09-27 16:20:48 UTC --- While fiddling around a bit more I found that gcc normally doesn't let me create objects whose size exceeds PTRDIFF_MAX. For objects of size at most PTRDIFF_MAX, the bug cannot be triggered. The only function I found which does create such large objects is malloc(). Presumably, its companions calloc() and realloc() do so as well. In this light, the best fix for this bug seems to be for malloc() and companions to simply return NULL upon a request for an object whose size exceeds PTRDIFF_MAX.
next prev parent reply other threads:[~2010-09-27 16:20 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-09-24 16:06 [Bug c/45779] New: " aklauer at rumms dot uni-mannheim.de 2010-09-27 18:27 ` aklauer at rumms dot uni-mannheim.de [this message] 2015-02-20 8:29 ` [Bug c/45779] " pinskia 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=20100927182700.qdhEY5zs29juaeQFavUE7i3qaa1Gd1BrpswKW6jKC6Y@z \ --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: linkBe 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).