Valgrind is not clean for me with the change.<br><br>  Matt<br><br><div class="gmail_quote">On Fri, Dec 25, 2009 at 10:28 AM, Satish Balay <span dir="ltr"><<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Well - normally the first step with detecting the bugs is to report<br>
them to the author - and ask for a fix..<br>
<font color="#888888"><br>
Satish<br>
</font><div><div></div><div class="h5"><br>
On Fri, 25 Dec 2009, Matthew Knepley wrote:<br>
<br>
> I can try, but I still think replacement is the only real alternative. This<br>
> is not<br>
> able to be debugged, or you would not recommend sticking in random numbers<br>
> in malloc() and I would be able to see where an SEGV occurs with gdb.<br>
><br>
>   Matt<br>
><br>
> On Fri, Dec 25, 2009 at 10:16 AM, Satish Balay <<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>> wrote:<br>
><br>
> > BTW: What linux are you using? ubuntu version? i686 or x86_64? etc...<br>
> ><br>
> > also try:<br>
> ><br>
> > arg->name     = (char *)MALLOC( strlen(p) + 100 );<br>
> ><br>
> > satish<br>
> ><br>
> ><br>
> > On Fri, 25 Dec 2009, Satish Balay wrote:<br>
> ><br>
> > > Did my suggested change not work for you?<br>
> > ><br>
> > > Satish<br>
> > ><br>
> > > On Thu, 24 Dec 2009, Matthew Knepley wrote:<br>
> > ><br>
> > > > I spent a bunch of time on this today. This shit is hopelessly broken.<br>
> > It<br>
> > > > sucks completely.<br>
> > > > I cannot get it to run, nor see why it is causing stack overruns and<br>
> > SEGVs.<br>
> > > > If anyone does<br>
> > > > not think it is hopeless, speak up now. This is a complete fucking<br>
> > > > embarrassment.<br>
> > > ><br>
> > > >    Matt<br>
> > > ><br>
> > > > On Mon, Dec 21, 2009 at 4:42 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>><br>
> > wrote:<br>
> > > ><br>
> > > > > This does not make any sense to me because it would be a heap<br>
> > violation,<br>
> > > > > not a stack smash.<br>
> > > > ><br>
> > > > >   Matt<br>
> > > > ><br>
> > > > ><br>
> > > > > On Mon, Dec 21, 2009 at 4:30 PM, Satish Balay <<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>><br>
> > wrote:<br>
> > > > ><br>
> > > > >> [I don't know the correct fix for this - but ] The following change<br>
> > is<br>
> > > > >> getting rid of valgrind messages for me. Maybe you can use this,<br>
> > build<br>
> > > > >> sowing separately - and continue..<br>
> > > > >><br>
> > > > >> Satish<br>
> > > > >><br>
> > > > >> ----------<br>
> > > > >><br>
> > > > >> diff -r dbe25084c0e4 src/bfort/bfort.c<br>
> > > > >> --- a/src/bfort/bfort.c Mon Dec 15 22:20:58 2008 -0600<br>
> > > > >> +++ b/src/bfort/bfort.c Mon Dec 21 16:29:09 2009 -0600<br>
> > > > >> @@ -2157,7 +2157,7 @@<br>
> > > > >><br>
> > > > >>     /* Current token is name */<br>
> > > > >>     arg->has_star = (nstar > 0);<br>
> > > > >> -    arg->name     = (char *)MALLOC( strlen(p) + 1 );<br>
> > > > >> +    arg->name     = (char *)MALLOC( strlen(p) + 10 );<br>
> > > > >>     strcpy( arg->name, p );<br>
> > > > >><br>
> > > > >>     /* We can't output the name just yet, because if it is<br>
> > > > >><br>
> > > > >><br>
> > > > >><br>
> > > > >><br>
> > > > >> On Mon, 21 Dec 2009, Matthew Knepley wrote:<br>
> > > > >><br>
> > > > >> > The problem appears to be in OutputRoutine() in bfort.c, but that<br>
> > code<br>
> > > > >> is<br>
> > > > >> > impossible<br>
> > > > >> > to debug. I can't see where something is getting overwritten, and<br>
> > it<br>
> > > > >> looks<br>
> > > > >> > like the check<br>
> > > > >> > only happens when the routine returns. bfort is such crap.<br>
> > > > >> ><br>
> > > > >> >   Matt<br>
> > > > >> ><br>
> > > > >> > On Mon, Dec 21, 2009 at 3:25 PM, Matthew Knepley <<br>
> > <a href="mailto:knepley@gmail.com">knepley@gmail.com</a>><br>
> > > > >> wrote:<br>
> > > > >> ><br>
> > > > >> > > On Mon, Dec 21, 2009 at 3:21 PM, Satish Balay <<br>
> > <a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>><br>
> > > > >> wrote:<br>
> > > > >> > ><br>
> > > > >> > >> On Mon, 21 Dec 2009, Lisandro Dalcín wrote:<br>
> > > > >> > >><br>
> > > > >> > >> > On Mon, Dec 21, 2009 at 5:37 PM, Matthew Knepley <<br>
> > > > >> <a href="mailto:knepley@gmail.com">knepley@gmail.com</a>><br>
> > > > >> > >> wrote:<br>
> > > > >> > >> > ><br>
> > > > >> > >> > > It says there is a stack smash and no other info. This is<br>
> > > > >> completely<br>
> > > > >> > >> fucking<br>
> > > > >> > >> > > my development right now.<br>
> > > > >> > >> > ><br>
> > > > >> > >> ><br>
> > > > >> > >> > Any chance bfort was built with -fstack-protector flag? This<br>
> > > > >> failure<br>
> > > > >> > >> > could could be signaling an actual old bug in bfort... I<br>
> > would<br>
> > > > >> > >> > re-build bfort with debug and re-run under valgrind...<br>
> > > > >> > >><br>
> > > > >> > >> That must be it.<br>
> > > > >> > >><br>
> > > > >> > >> I just ran my build [which is without -fstack-protector] - and<br>
> > > > >> > >> valgrind does flag a bunch of things with bfort.<br>
> > > > >> > >><br>
> > > > >> > ><br>
> > > > >> > > 1) That flag is nowhere in my build.<br>
> > > > >> > ><br>
> > > > >> > > 2) Something changed<br>
> > > > >> > ><br>
> > > > >> > >   Matt<br>
> > > > >> > ><br>
> > > > >> > ><br>
> > > > >> > >> I normally install sowing separately and have it in my PATH -<br>
> > so that<br>
> > > > >> > >> it doesn't have to be rebuilt each time I build petsc.<br>
> > > > >> > >><br>
> > > > >> > >> I guess we should sync up [our patches] with latest sowing and<br>
> > make<br>
> > > > >> > >> sure its valgrind clean aswell.<br>
> > > > >> > >><br>
> > > > >> > >> Satish<br>
> > > > >> > ><br>
> > > > >> > ><br>
> > > > >> > ><br>
> > > > >> > ><br>
> > > > >> > > --<br>
> > > > >> > > What most experimenters take for granted before they begin their<br>
> > > > >> > > experiments is infinitely more interesting than any results to<br>
> > which<br>
> > > > >> their<br>
> > > > >> > > experiments lead.<br>
> > > > >> > > -- Norbert Wiener<br>
> > > > >> > ><br>
> > > > >> ><br>
> > > > >> ><br>
> > > > >> ><br>
> > > > >> ><br>
> > > > >><br>
> > > > ><br>
> > > > ><br>
> > > > ><br>
> > > > > --<br>
> > > > > What most experimenters take for granted before they begin their<br>
> > > > > experiments is infinitely more interesting than any results to which<br>
> > their<br>
> > > > > experiments lead.<br>
> > > > > -- Norbert Wiener<br>
> > > > ><br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > ><br>
> > ><br>
> ><br>
><br>
><br>
><br>
><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>