W dniu 2012-09-29 01:32, Andreas Fritiofson pisze: > I just checked and the same construct is used in several places. I > wouldn't want to reinstate the user pointer unless as a temporary fix, > though. The mechanism is flawed and dangerous. I've seen some uses > that could possibly corrupt stack with the user pointer thingy in > place (flash/nand/lpc...). > > To find possible problem areas, search for instances of pointer to > struct working_area. Discard all that doesn't have static duration > (possibly as part of another struct). Check all uses of the remaining > ones for code that tries to reuse the area if the pointer is non-null. > > I have a patch that has been collecting dust for months (years?) to > convert all working area pointers in flash structures to local > variables. Maybe it's time to polish it up. It probably fixes some of > the sites.
I think that this regression mandates a bugfix 0.6.1 release, so I'm wondering which way should we go... 1. Reverting the change gets OpenOCD to the state it was in before - every algorithm that worked then will work after revert. Every algorithm that was broken at that time will still be broken. Quick and easy, not a real fix. We just get rid of the regression and not the real problem. 2. Finding and removing static pointers to working area that the code tries to reuse - slow digging through the code, possible side effects? 3. Converting the code to NEVER store pointers to working area anywhere (as there is no point in doing that - right?) - a slow and real fix, possible side effects? If we'd choose fix #1 it wouldn't require much testing as it's just a revert. Other fixes would probably need some kind of short RC phase. I think you should upload your patch to gerrit or post it to the list now (in "unpolished" form)- I'd like to help you with it and I'd see how much of "it" is there, this could help us decide on what to do with 0.6.0->0.6.1 release. Maybe there will be some more volunteers to help with it - who knows? 4\/3!! ------------------------------------------------------------------------------ How fast is your code? 3 out of 4 devs don\\\'t know how their code performs in production. Find out how slow your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219672;13503038;z? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
