This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR 2719, demangler crash




--On Wednesday, December 12, 2001 04:30:59 PM -0500 DJ Delorie 
<dj@redhat.com> wrote:

>
>> This problem is on mainline and branch.
>> Is this one OK for branch as well?
>>
>> The testcase is in PR 2719:
>
> Ok for mainline.  Ok with me for branch, but needs Mark's approval.
> Mark?

This isn't ideal.

There's already an attempt at checking for overflow:

  if ((count % 10) != 0)

which I suspect should say:

  if ((count % 10) != 0 || count < 0)

Even better would be to say:

  if (INTMAX / 10 < count)

before the:

  count *= 10

The change is OK for the branch, but we should do better on the mainline.
Please let me know when you've checked it in on the branch.

-- 
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]