public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105769] New: program segmentation fault with -ftree-vectorize and nested lambdas
@ 2022-05-29 21:24 sliwa at ifpan dot edu.pl
  2022-05-30 10:14 ` [Bug tree-optimization/105769] " marxin at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: sliwa at ifpan dot edu.pl @ 2022-05-29 21:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105769

            Bug ID: 105769
           Summary: program segmentation fault with -ftree-vectorize and
                    nested lambdas
           Product: gcc
           Version: 11.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sliwa at ifpan dot edu.pl
  Target Milestone: ---

Created attachment 53050
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53050&action=edit
sample program demonstrating undefined behavior

The attached program triggers undefined behavior with g++ (the resulting binary
segfaults in the manager code of a functor wrapper) when compiled as follows
(minimal flags to trigger):

g++ -flto -O1 -ftree-vectorize tst.cc

This may be related to memory alignment of data (I see a crash with long
double, but not with double). Other things to check is the capture of functor
est in program line 57 (adding an ampersand eliminates the issue). Even
changing the data in lines 81-82 (for example to 0) affects the outcome.

Platform: amd64, RHEL or Gentoo Linux.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-05-29 10:07 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-29 21:24 [Bug c++/105769] New: program segmentation fault with -ftree-vectorize and nested lambdas sliwa at ifpan dot edu.pl
2022-05-30 10:14 ` [Bug tree-optimization/105769] " marxin at gcc dot gnu.org
2022-06-02  8:10 ` [Bug tree-optimization/105769] [11/12/13 Regression] " rguenth at gcc dot gnu.org
2022-10-19 10:15 ` rguenth at gcc dot gnu.org
2022-10-19 11:01 ` marxin at gcc dot gnu.org
2023-01-16 20:30 ` jakub at gcc dot gnu.org
2023-01-16 21:10 ` jakub at gcc dot gnu.org
2023-01-16 21:20 ` jakub at gcc dot gnu.org
2023-01-17 11:52 ` jakub at gcc dot gnu.org
2023-01-17 12:11 ` jakub at gcc dot gnu.org
2023-01-17 12:27 ` rguenth at gcc dot gnu.org
2023-01-17 12:31 ` jakub at gcc dot gnu.org
2023-01-17 12:41 ` jakub at gcc dot gnu.org
2023-01-17 14:08 ` rguenther at suse dot de
2023-01-17 14:45 ` jakub at gcc dot gnu.org
2023-01-17 15:14 ` rguenther at suse dot de
2023-05-29 10:07 ` [Bug tree-optimization/105769] [11/12/13/14 " jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).