This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix VAX crash
- From: Graham Stott <graham dot stott at btinternet dot com>
- To: Jason R Thorpe <thorpej at wasabisystems dot com>
- Cc: gcc-patches at gcc dot gnu dot org, rth at redhat dot com
- Date: Wed, 06 Nov 2002 19:32:30 +0000
- Subject: Re: [PATCH] Fix VAX crash
- References: <20021105230711.L27156@dhcp7.wlan.shagadelic.org>
Jason R Thorpe wrote:
In reference to:
...your REAL_TO_DECIMAL -> real_to_decimal change seems to be
the culprit. The attached patch prevents the compiler from crashing,
although it's not clear to me why real_to_decimal isn't obeying
the passed-in buffer size..?
Taking a quick peek at the real_to_decimal routine I see a fair number of
places where it adds to the buffer without checking if there's any room left.
It's probably easier and simpler for the routine to use an internal
buffer that's always big enough to accumulate the result and then at
the end copy it to the output buffer truncating if necessary.