]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Fix an oversight in aarch64_evpc_reencode
authorPengxuan Zheng <quic_pzheng@quicinc.com>
Fri, 16 May 2025 00:52:29 +0000 (17:52 -0700)
committerPengxuan Zheng <quic_pzheng@quicinc.com>
Fri, 16 May 2025 18:22:29 +0000 (11:22 -0700)
commitd77c3bc1c35e3032b91648dbef4e0ef1f6020017
treeef260bd558264b2c33221dc1fb051ebeb7e8324f
parent259154325688cbfe6d3b50e91dbd6b997a969d6d
aarch64: Fix an oversight in aarch64_evpc_reencode

Some fields (e.g., zero_op0_p and zero_op1_p) of the struct "newd" may be left
uninitialized in aarch64_evpc_reencode. This can cause reading of uninitialized
data. I found this oversight when testing my patches on and/fmov
optimizations. This patch fixes the bug by zero initializing the struct.

Pushed as obvious after bootstrap/test on aarch64-linux-gnu.

gcc/ChangeLog:

* config/aarch64/aarch64.cc (aarch64_evpc_reencode): Zero initialize
newd.
gcc/config/aarch64/aarch64.cc