public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Alan Modra <amodra@gmail.com>, Iain Buclaw <ibuclaw@gdcproject.org>
Cc: Ian Lance Taylor <ian@airs.com>, gcc-patches@gcc.gnu.org
Subject: Re: ubsan: d-demangle.c:214 signed integer overflow
Date: Fri, 13 Nov 2020 12:04:09 -0700	[thread overview]
Message-ID: <b69f55e6-bf0c-a47c-aa79-48c5a5451517@redhat.com> (raw)
In-Reply-To: <20200904133403.GV15695@bubble.grove.modra.org>


On 9/4/20 7:34 AM, Alan Modra via Gcc-patches wrote:
> So this one is on top of the previously posted patch.
>
> 	* d-demangle.c (string_need): Take a size_t n arg, and use size_t tem.
> 	(string_append): Use size_t n.
> 	(string_appendn, string_prependn): Take a size_t n arg.
> 	(TEMPLATE_LENGTH_UNKNOWN): Define as -1UL.
> 	* d-demangle.c (dlang_number): Make "ret" an unsigned long*.
> 	Only succeed for result of [0,4294967295UL].
> 	(dlang_decode_backref): Only succeed for result [1,MAX_LONG].
> 	(dlang_backref): Remove now unnecessary range check.
> 	(dlang_symbol_name_p): Likewise.
> 	(dlang_lname, dlang_parse_template): Take an unsigned long len
> 	arg.
> 	(dlang_symbol_backref, dlang_identifier, dlang_parse_integer),
> 	(dlang_parse_integer, dlang_parse_string),
> 	(dlang_parse_arrayliteral, dlang_parse_assocarray),
> 	(dlang_parse_structlit, dlang_parse_tuple),
> 	(dlang_template_symbol_param, dlang_template_args): Use
> 	unsigned long variables.
> 	* testsuite/d-demangle-expected: Add new tests.

Explicitly leaving this to Iain.


jeff



      parent reply	other threads:[~2020-11-13 19:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 13:01 Alan Modra
2020-09-03 21:02 ` Iain Buclaw
2020-09-04  0:59   ` Alan Modra
2020-09-04 11:22     ` Iain Buclaw
2020-09-04 13:34       ` Alan Modra
2020-09-04 16:23         ` Iain Buclaw
2020-09-07  0:56           ` Alan Modra
2020-09-07 16:17             ` Iain Buclaw
2020-09-07 17:46               ` Ian Lance Taylor
2020-11-13 19:04         ` Jeff Law [this message]

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=b69f55e6-bf0c-a47c-aa79-48c5a5451517@redhat.com \
    --to=law@redhat.com \
    --cc=amodra@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=ian@airs.com \
    --cc=ibuclaw@gdcproject.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).