On Fri, Dec 25, 2009 at 10:14 AM, Satish Balay <span dir="ltr"><<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Did my suggested change not work for you?<font color="#888888"><br></font></blockquote><div><br>No. It did not even fix the stack smash. I fixed that, but then it SEGV somewhere else.<br><br>  Matt<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font color="#888888">
Satish<br>
</font><div><div></div><div class="h5"><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. It<br>
> sucks completely.<br>
> I cannot get it to run, nor see why it is causing stack overruns and 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>> wrote:<br>
><br>
> > This does not make any sense to me because it would be a heap 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>> wrote:<br>
> ><br>
> >> [I don't know the correct fix for this - but ] The following change is<br>
> >> getting rid of valgrind messages for me. Maybe you can use this, 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 code<br>
> >> is<br>
> >> > impossible<br>
> >> > to debug. I can't see where something is getting overwritten, and 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 <<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 <<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 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 - 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 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 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 their<br>
> > experiments lead.<br>
> > -- Norbert Wiener<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>