]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix possible double-free and leak in BB SLP discovery
authorRichard Biener <rguenther@suse.de>
Wed, 29 Oct 2025 08:03:57 +0000 (09:03 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 29 Oct 2025 14:15:41 +0000 (15:15 +0100)
commitdd7dffb02ff5cd3a88654deacad67298ee8ed8fa
treede339fd16062c56ef0e533e4f6425e9a58a0b2b9
parentfe7827c25a4e0965f0600d026448c1d73ca107de
Fix possible double-free and leak in BB SLP discovery

vect_build_slp_instance always releases the scalar stmts vector, so make sure
to mark it as released and actually release it.

* tree-vect-slp.cc (vect_analyze_slp): Mark stmts in BB roots
as released after vect_build_slp_instance.
(vect_build_slp_instance): Release scalar_stmts when exiting
early.
gcc/tree-vect-slp.cc