Krzysztof Parzyszek 871086bf7f
[flang] Avoid passing null pointers to nonnull parameters (#84785)
Certain functions in glibc have "nonnull" attributes on pointer
parameters (even in cases where passing a null pointer should be handled
correctly). There are a few cases of such calls in flang: memcmp and
memcpy with the length parameter set to 0.

Avoid passing a null pointer to these functions, since the conflict with
the nonnull attribute could cause an undefined behavior.

This was detected by the undefined behavior sanitizer.
2024-03-12 07:53:57 -05:00
..
2023-05-30 14:12:20 -07:00