[Bug middle-end/113596] Stack memory leakage caused by inline alloca

2024-05-03 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113596 --- Comment #12 from GCC Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:7117e1f6bf6de25c1ff26c4d7abcc79b407ca221 commit r15-125-g7117e1f6bf6de25c1ff26c4d7abcc79b407ca221 Author: Jakub Jelinek Date: F

[Bug middle-end/113596] Stack memory leakage caused by inline alloca

2024-01-25 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113596 --- Comment #11 from Jakub Jelinek --- In reply to Richard Biener from comment #10) > We can make ->calls_alloca more precise though of course > we usually also do not want to inline functions with VLAs. Yes. Or remember while inlining whether

[Bug middle-end/113596] Stack memory leakage caused by inline alloca

2024-01-25 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113596 --- Comment #10 from Richard Biener --- (In reply to Jakub Jelinek from comment #9) > Created attachment 57215 [details] > gcc14-pr113596.patch > > Untested patch to do that. > The disadvantage of doing that is that it may penalize inline calls

[Bug middle-end/113596] Stack memory leakage caused by inline alloca

2024-01-25 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113596 --- Comment #9 from Jakub Jelinek --- Created attachment 57215 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57215&action=edit gcc14-pr113596.patch Untested patch to do that. The disadvantage of doing that is that it may penalize inline

[Bug middle-end/113596] Stack memory leakage caused by inline alloca

2024-01-25 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113596 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #8

[Bug middle-end/113596] Stack memory leakage caused by inline alloca

2024-01-25 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113596 --- Comment #7 from Richard Biener --- In theory, if somebody really wanted it, we could replace alloca with __builtin_stack_save/restore during inlining (not sure if it would simply work, and be efficient, by just putting save at the start of t

[Bug middle-end/113596] Stack memory leakage caused by inline alloca

2024-01-25 Thread sanpeqf at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113596 John Sanpe changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug middle-end/113596] Stack memory leakage caused by inline alloca

2024-01-25 Thread sanpeqf at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113596 --- Comment #5 from John Sanpe --- (In reply to Andrew Pinski from comment #3) > The documentation should be more clear on this though. But adding a hint would also be reasonable

[Bug middle-end/113596] Stack memory leakage caused by inline alloca

2024-01-25 Thread sanpeqf at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113596 --- Comment #4 from John Sanpe --- (In reply to Andrew Pinski from comment #1) > Why do you think this is a bug? > > You are forcing a function which calls alloca to be inlined, GCC DOES not > normally inline functions which call alloca due to

[Bug middle-end/113596] Stack memory leakage caused by inline alloca

2024-01-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113596 Andrew Pinski changed: What|Removed |Added Keywords||documentation --- Comment #3 from Andre

[Bug middle-end/113596] Stack memory leakage caused by inline alloca

2024-01-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113596 --- Comment #2 from Andrew Pinski --- You could instead use VLA which is done correctly though.

[Bug middle-end/113596] Stack memory leakage caused by inline alloca

2024-01-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113596 --- Comment #1 from Andrew Pinski --- Why do you think this is a bug? You are forcing a function which calls alloca to be inlined, GCC DOES not normally inline functions which call alloca due to not restoring the stack pointer after the return