[PING**3] [PATCH] Fix not properly nul-terminated string constants in JIT

Bernd Edlinger bernd.edlinger@hotmail.de
Thu Nov 1 15:09:00 GMT 2018


Ping...

On 10/10/18 9:43 PM, Bernd Edlinger wrote:
> Ping...
> 
> 
> On 08/26/18 21:40, Bernd Edlinger wrote:
>> Ping...
>>
>> This is just plain wrong, independent
>> of any STRING_CST semantic issues.
>>
>> The original patch (retested on current trunk) is
>> here: https://gcc.gnu.org/ml/gcc-patches/2018-08/msg00370.html
>>
>>
>> On 08/05/18 18:59, Bernd Edlinger wrote:
>>> Hi!
>>>
>>>
>>> My other patch with adds assertions to varasm.c regarding correct
>>> nul termination of sting literals did make these incorrect string
>>> constants in JIT frontend fail.
>>>
>>> The string constants are not nul terminated if their length exceeds
>>> 200 characters.  The test cases do not use strings of that size where
>>> that would make a difference.  But using a fixed index type is clearly
>>> wrong.
>>>
>>> This patch removes the fixed char[200] array type from playback::context,
>>> and uses build_string_literal instead of using build_string directly.
>>>
>>>
>>> Bootstrapped and reg-tested on x86_64-pc-linux-gnu.
>>> Is it OK for trunk?
>>>
>>>
>>> Thanks
>>> Bernd.


More information about the Gcc-patches mailing list