AVR Downloader/UploaDEr - Bugs: bug #26408, Crash in stk500v2_open()
You are not allowed to post comments on this tracker with your current authentication level.
bug #26408: Crash in stk500v2_open()
Submitter: | Ferenc Kovacs <derefer> | ||
Submitted: | Thu 30 Apr 2009 07:50:10 PM UTC | ||
Category: | None | Severity: | 3 - Normal |
Priority: | 5 - Normal | Item Group: | None |
Status: | Fixed | Privacy: | Public |
Assigned to: | joerg_wunsch | Originator Name: | Ferenc Kovacs |
Open/Closed: | Closed | Release: | None |
Programmer hardware: | Device type: |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 5 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2009-07-02 | joerg_wunsch | Status | None | Fixed | |
Assigned to | None | joerg_wunsch | |||
Open/Closed | Open | Closed | |||
2009-04-30 | derefer | Carbon-Copy | Removed derefer | - | |
2009-04-30 | derefer | Carbon-Copy | - | Added derefer |
Powered by Savane 3.13-0329.
Corresponding source code
Hi,
When I connect something (e.g. a simple USB <-> Serial adapter,
instead of a working STK500) to /dev/ttyUSB0 and I enter:
$ avrdude-trunk -c stk500 -p m32 -P /dev/ttyUSB0
avrdude: stk500_getsync(): not in sync: resp=0x95
Segmentation fault (core dumped)
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Core was generated by `avrdude -c stk500 -p m32 -P /dev/ttyUSB0'.
Program terminated with signal 11, Segmentation fault.
[New process 8709]
#0 0x00000000004253f8 in stk500v2_open (pgm=0x1935fd0, port=0x7fff255b465d "/dev/ttyUSB0") at stk500v2.c:1190
1190 PDATA(pgm)->pgmtype = PGMTYPE_UNKNOWN;
(gdb) bt
#0 0x00000000004253f8 in stk500v2_open (pgm=0x1935fd0, port=0x7fff255b465d "/dev/ttyUSB0") at stk500v2.c:1190
#1 0x000000000042aa13 in stk500generic_open (pgm=0x1935fd0, port=0x7fff255b465d "/dev/ttyUSB0") at stk500generic.c:54
#2 0x0000000000403a84 in main (argc=7, argv=0x7fff255b3978) at main.c:777
Target: x86_64-linux-gnu
Compiler: gcc version 4.3.3 (Debian 4.3.3-5)
It seems to me, that the setup function for STK500V2 is not
called to initialize the cookie field. STK500 doesn't seem to
use this field, but when we fallback to STK500V2 cookie gets
dereferenced and it's 0x0. IMO, setup could be called in
stk500generic.c before opening STK500V2.
(Yes, it doesn't make too much sense to use AVRDUDE without a
working programmer :), but I couldn't make my STK500 work yet
due to some kernel issues with FTDI chips...)
Cheers,
Ferenc