This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/79992] accessing storage member of lambda via pointer with -no-pie causes the next function to overwrite the pointer's data
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 10 Mar 2017 19:57:15 +0000
- Subject: [Bug middle-end/79992] accessing storage member of lambda via pointer with -no-pie causes the next function to overwrite the pointer's data
- Auto-submitted: auto-generated
- References: <bug-79992-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79992
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
static auto get_wrapped_number() {
return [i = 1] { return &i; };
}
This seems like you could reference a variable which has gone out of scope.