Unverified Commit 871086bf authored by Krzysztof Parzyszek's avatar Krzysztof Parzyszek Committed by GitHub
Browse files

[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.
parent c7f1a987
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment