On 29/09/12 07:44, Freddie Chopin wrote: > 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...). >>
ouch, this is a nasty little gem. The mips fast_data_area will also need looking at. >> 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... > I agree. > 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. > A lot depends on how much time people can offer. I should be able to spend some time on this from tuesday. If we feel this cannot wait a week then we need to revert and role out a bug fix release - what's the general consensus ? > 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? > Andreas patches i guess are here: http://repo.or.cz/w/openocd/andreasf.git/shortlog/refs/heads/work_alloc Spen ------------------------------------------------------------------------------ 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
