[all-commits] [llvm/llvm-project] 871086: [flang] Avoid passing null pointers to nonnull par...
Krzysztof Parzyszek via All-commits
all-commits at lists.llvm.org
Tue Mar 12 05:54:19 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 871086bf7fad42d610bfe02224662bdc71494a70
https://github.com/llvm/llvm-project/commit/871086bf7fad42d610bfe02224662bdc71494a70
Author: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: 2024-03-12 (Tue, 12 Mar 2024)
Changed paths:
M flang/include/flang/Parser/char-block.h
M flang/runtime/buffer.h
M flang/runtime/temporary-stack.cpp
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list