On Wed, 13 Aug 2025 at 22:35, Dmitry Goncharov <invalid.nore...@gnu.org> wrote:
> Follow-up Comment #1, bug #67424 (group make): > > Next someone will want to set an env variable with 64M long name. > You can always create an artificial scenario that overflows the stack. > On the other hand, heap allocations are more expensive. > > ______________________________ Stack allocations probably shouldn't be used for something that is unbounded though. Nobody actually states a limit on $(info) in the manual whether or not we even know what that limit would have to be on each platform. A variable could end up being generated by code that was unusually long for non predictable reasons and if $(info) tried to output that it would crash. To stop their makefile from crashing, users would have to use the non-existent numerical comparison operators to check if every info string was "too long" or info itself would have to cut strings at some arbitrary limit and not output them all thus generating incorrect logs - and since we sometimes want to process logs to list errors or other data that wouldn't be good either. To gold plate something like this you could stack allocate it if it was less than e.g. 1k and that would leave the vast majority of situations the same as they are now, Regards, Tim > _________________________ > > Reply to this item at: > > <https://savannah.gnu.org/bugs/?67424> > > _______________________________________________ > Message sent via Savannah > https://savannah.gnu.org/ >