On Tue, Jun 21, 2016 at 09:57:59AM -0600, Jeff Law wrote: > >Would a new attribute to annotate async-signal safe functions > >help? I envision that the attribute on a function definition > >would turn off the alloca/VLA to malloc transformation, and > >could also diagnose calls to other function whose declarations > >were not also declared async-signal safe with the same > >attribute. > It's probably a good idea -- there's enough "special" stuff with those > functions that having a way to mark them is useful. > > In fact, given the attribute, we ought to be able to build warnings around > multiple constructs that are not safe in that context.
What about functions that are meant to be async-signal safe only for certain arguments or under some other conditions? Automatically turning VLAs or alloca into malloc/free would break those. Jakub