* Markus Elfring (Markus.Elfring@xxxxxx) wrote: > >>> Is there a way to look for functions that have a lock, followed by unlocks on > >>> multiple error paths? > >> > >> Probably, yes. > >> https://cwe.mitre.org/data/definitions/667.html > >> > >> > >>> IMHO the nicest thing with guard is simplifying lots of error paths, and > >>> innevitably someone forgets to unlock in one of them. > >> > >> Would you like to improve the support anyhow for more complete and succinct > >> resource management in affected software areas? > > > > I was just suggesting a perhaps more targeted approach rather than > > just looking for all cases of lock/unlock. > > How would you like to handle source code analyses if lock scopes > would occasionally be distributed over different function implementations? It depends on the aim: a) If you want to find some cases to replace with guard, then I'd only do the simple case where there is nothing distributed across functions. b) If you're trying to prove/detect failures then that needs to look at the hard cases I guess; but I think there are other tools doing that?? > Will development interests grow also for checking combinations according to > other pairs of actions? This is only a suggestion from me; I wouldn't drive too much off it. Dave > Regards, > Markus -- -----Open up your eyes, open up your mind, open up your code ------- / Dr. David Alan Gilbert | Running GNU/Linux | Happy \ \ dave @ treblig.org | | In Hex / \ _________________________|_____ http://www.treblig.org |_______/