This does not make any sense to me because it would be a heap violation, not a stack smash.<br><br> Matt<br><br><div class="gmail_quote">On Mon, Dec 21, 2009 at 4:30 PM, 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;">[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>
<div><div></div><div class="h5"><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 is<br>
> impossible<br>
> to debug. I can't see where something is getting overwritten, and it 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>> 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>> 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 <<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 completely<br>
> >> fucking<br>
> >> > > my development right now.<br>
> >> > ><br>
> >> ><br>
> >> > Any chance bfort was built with -fstack-protector flag? This 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 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>