[Tinyos-devel] C sf problems
Bart Braem
bart.braem at gmail.com
Wed May 10 23:36:49 PDT 2006
I've discovered another error in that file with valgrind, line 392 should read:
struct packet_list *entry = malloc(sizeof (struct packet_list)), **last;
This gives way safer results...
Bart
On 5/10/06, David Gay <dgay42 at gmail.com> wrote:
> On 5/10/06, Bart Braem <bart.braem at gmail.com> wrote:
> > $ valgrind ./sf 9001 /dev/ttyUSB0 57600 telos
> > ==26637== Memcheck, a memory error detector.
> > ==26637== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
> > ==26637== Using LibVEX rev 1575, a library for dynamic binary translation.
> > ==26637== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
> > ==26637== Using valgrind-3.1.1, a dynamic binary instrumentation framework.
> > ==26637== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
> > ==26637== For more details, rerun with: -v
> > ==26637==
> > ==26637== Conditional jump or move depends on uninitialised value(s)
> > ==26637== at 0x8049A77: serial_source_empty (serialsource.c:437)
> > ==26637== by 0x8049231: main (sf.c:296)
>
> Oops. The following should fix it:
> serialsource.c line 274:
> < memset(src, 0, sizeof src);
> > memset(src, 0, sizeof *src);
>
> I'll check the fix in when sourceforge comes back to life...
>
> Thanks!
>
> David Gay
>
--
"May the source be with you"
More information about the Tinyos-devel
mailing list