Otherwise c[ABI].val can point to a no-longer-valid on-stack buffer
after config_init returns.
Reported by: GCC 13 -Wdangling-pointer
Differential D42583
pkg: Use a global buffer for local ABI string jhb on Nov 13 2023, 10:30 PM. Authored by Tags None Referenced Files
Subscribers
Details
Diff Detail
Event TimelineComment Actions I don't know that we really need that extra complexity TBH. But alternatively, yes, I would make pkg_get_myabi() return an allocated string that the caller has to manage the lifetime of. |