[patch, libfortran] Fix PR 80365, undefined memcpy
Thomas Koenig
tkoenig@netcologne.de
Mon Jul 24 11:13:00 GMT 2017
Hi Janne,
> On Sun, Jul 23, 2017 at 10:23 PM, Thomas Koenig <tkoenig@netcologne.de> wrote:
>> Hello world,
>>
>> the attached test cases fixes a problematic invocation of
>> memcpy where src=NULL and n=0 by simply doing nothing
>> in the surrounding function if there is nothing to be done.
>>
>> No test case, because this only shows up with a sanitized
>> libgfortran or under a debugger.
>>
>> OK for trunk?
>
> Good catch, Ok.
Committed, thanks for the review.
What is the opinion on backporting? We should avoid undefined
behavior in the library, I think, so I am leanding towards
doing it.
Regards
Thomas
More information about the Fortran
mailing list