URL:
<http://savannah.nongnu.org/bugs/?42056>
Summary: Current SVN version: double free or corruption
triggered at exit
Project: AVR Downloader/UploaDEr
Submitted by: None
Submitted on: Sat 05 Apr 2014 05:17:30 PM UTC
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Name: Rok Mandeljc
Originator Email: [email protected]
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
The current SVN version (r1295) of avrdude causes a double free or corruption
at exit.
The problem seems to be introduced by the following commit: r1290: "pgm.c
(pgm_free): Cleanup police: destroy the p->usbpid list when freeing the
programmer struct." Reverting it fixes the issue.
However, the actual culprit is the code for duplication of programmer
definitions, pgm_dup(). In line 165, information from source structure is
copied to the new structure using memcpy(). pgm->id is then reinitialized, but
pgm->usbpid is not, and remains a shallow copy. Therefore, when programmers
are destroyed at exit, the usbpid entries in those duplicated programmer
definitions end up being freed multiple times...
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?42056>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
_______________________________________________
avrdude-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev