Files
clang-p2996/flang/runtime/temporary-stack.cpp
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

6.7 KiB