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] gcc/gcc.c: XNEWVEC enough space for 'saved_suffix' using



On 07/31/2014 06:29 AM, Joseph S. Myers wrote:
> On Thu, 31 Jul 2014, Chen Gang wrote:
> 
>> On 07/31/2014 06:12 AM, Joseph S. Myers wrote:
>>> On Thu, 24 Jul 2014, Chen Gang wrote:
>>>
>>>> strlen() will get string length excluding '\0', but strcpy() will append
>>>> '\0' in the end, so need XNEWVEC additional byte, or cause memory over
>>>> flow.
>>>
>>> OK assuming it passed regression testing (with ChangeLog entry as usual, 
>>> and you need to say what platform the patch was bootstrapped / regression 
>>> tested on).
>>>
>>
>> Excuse me, I only find it by reading source code, not give a test (for
>> me, this kind of patch welcomes the related test, but not mandatory).
> 
> I don't believe this particular patch needs a new regression test added to 
> the testsuite.
> 
> But you still need to meet all the usual patch requirements - run the GCC 
> testsuite before and after the patch, and verify that it does not 
> introduce any new failures, and say what platform you did that testing on.  
> Even "obvious" patches can have non-obvious typos, hence the need to run 
> the testsuite as a sanity check.
> 
> (For some sorts of patches it's different - e.g. for a patch to the 
> manual, "make info html pdf" is useful testing, but a testsuite run 
> isn't.)
> 

Thank you for your valuable information. And I shall try. For me, this
kind of tests are necessary for all kinds of patches (include this kind
of patch).

But excuse me, I am a newbie, I am not quit familiar with testsuite, so
maybe I can not finish soon. But I should finish the related test with
testsuite within this week end (within 2014-08-03).

And still welcome any related ideas, suggestions, and completions.

Thanks.

Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed


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