Hello,
    I have a c program which run properly but the
valgrind output says the following errors.I am not
able debug these errors.i use fedora core 2, gcc
compiler.I had attached the valgind output for various
executions of the program along with the relevant
lines in program that gives the error.I would like
some one to guide me.Thanks

Deepan Chakravarthy N


Various outputs of Valgrind:

output 1:-

Specific lines in the program:
==17352== Invalid read of size 4
==17352==    at 0x804AA18: writeconverged()
(ramesh-random-nov-26-0900.cpp:800)
==17352==    by 0x804B23F: main
(ramesh-random-nov-26-0900.cpp:974)
==17352==  Address 0x1BB31184 is 4 bytes before a
block of size 16 alloc'd
==17352==    at 0x1B904E35: operator new[](unsigned)
(vg_replace_malloc.c:139)
==17352==    by 0x80488B7: get_composition()
(ramesh-random-nov-26-0900.cpp:69)
==17352==    by 0x804B226: main
(ramesh-random-nov-26-0900.cpp:969)


output 2:-

==24194== Warning: silly arg (-304) to
__builtin_vec_new()
**24194** new/new[] failed and should throw an
exception, but Valgrind
   cannot throw exceptions and so is aborting instead.
 Sorry.
==24194==    at 0x1B8FC905: VALGRIND_PRINTF_BACKTRACE
(valgrind.h:229)
==24194==    by 0x1B904E5F: operator new[](unsigned)
(vg_replace_malloc.c:139)
==24194==    by 0x804889E: get_composition()
(ramesh-random-nov-26-0900.cpp:68)
==24194==    by 0x804B226: main
(ramesh-random-nov-26-0900.cpp:969)


output 3:-

==22630== Invalid read of size 4
      2 ==22630==    at 0x804AA18: writeconverged()
(ramesh-random-nov-26-0900.cpp:800)
      3 ==22630==    by 0x804B23F: main
(ramesh-random-nov-26-0900.cpp:974)
      4 ==22630==  Address 0x1BB31184 is 4 bytes
before a block of size 16 alloc'd
      5 ==22630==    at 0x1B904E35: operator
new[](unsigned) (vg_replace_malloc.c:139)
      6 ==22630==    by 0x80488B7: get_composition()
(ramesh-random-nov-26-0900.cpp:69)
      7 ==22630==    by 0x804B226: main
(ramesh-random-nov-26-0900.cpp:969)


relevent lines in program:

line no 800:
fprintf(reduced_ptr,"\t%d",newname[ptr[i2].links_div[i3][0]]
       );


line no 69:

  newname=new int [total_no_of_nodes];
 
line no 68:

  ptr=new struct node [total_no_of_nodes];

=====
link to deepan's home page: http://www.geocities.com/combiofriends/deepan.html

-------------------------------------------
center for biotechnology
anna university
chennai-25
india

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/EbFolB/TM
--------------------------------------------------------------------~-> 

>-----------------------------------------~-~>
CHECK THE ARCHIVE BEFORE POSTING!!!! Archive is available at 
http://www.eScribe.com/software/C-Paradise/

>------------------------------------------_->


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/C-Paradise/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to