Back to all issues

Issue 4914

Bug: Memory error reported when copying a structure with uninitialized padding


SubmittedProductStatus
2021-10-13Reactis for CResolved in 2021.0.2 (released Dec 22, 2023; release notes)

When an assignment occurs between two structures (which must have the same type), if the source structure is completely initialized except for the padding, an "uninitialized memory" error is reported. However, according to the C semantics, assignment of a struct is equivalent to assigning each field individually, so copying the padding is strictly optional. Hence, no "uninitialized memory" should be reported in this case.