[Bug c++/82309] Compiled binary received SIGSEGV when -g

2017-09-24 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82309 --- Comment #7 from Jonathan Wakely --- (In reply to Sergey Markelov from comment #6) > Unfortunately -fsanitize=undefined does not catch this. Thank you for your > help. -fsanitize=address catchs it, specifically the use-after-return

[Bug c++/82309] Compiled binary received SIGSEGV when -g

2017-09-24 Thread sergio_nsk at yahoo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82309 --- Comment #6 from Sergey Markelov --- (In reply to Andrew Pinski from comment #5) > The temp variable goes out if scope is the result of v0 + v1. And not the > auto. IIRC -fsanitize=undefined will catch this. Yes, I agree, I understood it

[Bug c++/82309] Compiled binary received SIGSEGV when -g

2017-09-23 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82309 --- Comment #5 from Andrew Pinski --- The temp variable goes out if scope is the result of v0 + v1. And not the auto. IIRC -fsanitize=undefined will catch this.

[Bug c++/82309] Compiled binary received SIGSEGV when -g

2017-09-23 Thread sergio_nsk at yahoo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82309 Sergey Markelov changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/82309] Compiled binary received SIGSEGV when -g

2017-09-23 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82309 --- Comment #3 from Andrew Pinski --- You have a temporary which you are using after it has gone out of scope.

[Bug c++/82309] Compiled binary received SIGSEGV when -g

2017-09-23 Thread sergio_nsk at yahoo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82309 --- Comment #2 from Sergey Markelov --- Created attachment 42231 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42231=edit Assembler

[Bug c++/82309] Compiled binary received SIGSEGV when -g

2017-09-23 Thread sergio_nsk at yahoo dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82309 --- Comment #1 from Sergey Markelov --- Created attachment 42230 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42230=edit Preprocessed file