Re: stack arenas using alloca

2024-08-26 Thread Florian Weimer via Gcc
* Michael Clark via Gcc: > On 8/23/24 15:57, Michael Clark wrote: >> On 8/23/24 15:46, Michael Clark wrote: >>> one more thing. it doesn't require PT_GNU_STACK or writable stacks >>> like GCC nested functions. πŸ™‚ so I think it is safer but it does >>> have safety issues, mostly related to stack ove

Re: stack arenas using alloca

2024-08-22 Thread Michael Clark via Gcc
On 8/23/24 15:57, Michael Clark wrote: On 8/23/24 15:46, Michael Clark wrote: one more thing. it doesn't require PT_GNU_STACK or writable stacks like GCC nested functions. πŸ™‚ so I think it is safer but it does have safety issues, mostly related to stack overflows but its going to need some care

Re: stack arenas using alloca

2024-08-22 Thread Martin Uecker via Gcc
Am Freitag, dem 23.08.2024 um 15:46 +1200 schrieb Michael Clark via Gcc: > On 8/23/24 15:24, Michael Clark wrote: > > On 8/15/24 06:24, Michael Clark wrote: > > > Hi Folks, > > > > > like I said this is crazy talk as alloca isn't even in the C standard. > > but VLAs are, and the current implement

Re: stack arenas using alloca

2024-08-22 Thread Michael Clark via Gcc
On 8/23/24 15:46, Michael Clark wrote: one more thing. it doesn't require PT_GNU_STACK or writable stacks like GCC nested functions. πŸ™‚ so I think it is safer but it does have safety issues, mostly related to stack overflows but its going to need some careful analysis with respect to ROP. brai

Re: stack arenas using alloca

2024-08-22 Thread Michael Clark via Gcc
On 8/23/24 15:24, Michael Clark wrote: On 8/15/24 06:24, Michael Clark wrote: Hi Folks, like I said this is crazy talk as alloca isn't even in the C standard. but VLAs are, and the current implementation of VLAs depends on alloca. one more thing. it doesn't require PT_GNU_STACK or writable s

Re: stack arenas using alloca

2024-08-22 Thread Michael Clark via Gcc
done at compile time. here is a reference to crazy talk on the LLVM discourse: - https://discourse.llvm.org/t/rfc-stack-arenas-using-alloca/80716 like I said this is crazy talk as alloca isn't even in the C standard. but VLAs are, and the current implementation of VLAs depends on alloca. Michael.

Re: stack arenas using alloca

2024-08-14 Thread Michael Clark via Gcc
Hi Folks, *sending again with Thunderbird because Apple Mail munged the message*. I wanted to share a seed of an idea I have been ruminating on for a while, and that is being able to return alloca memory from a function. I think it’s trivially possible by hacking the epilogue to unlink the f