bugAVR 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()

Submitted by:  Ferenc Kovacs <derefer>
Submitted on:  Thu 30 Apr 2009 07:50:10 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Joerg Wunsch <joerg_wunsch>Originator Name: Ferenc Kovacs
Open/Closed: ClosedRelease: None
Programmer hardware: Device type: 

Thu 30 Apr 2009 07:50:10 PM UTC, original submission:

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

Ferenc Kovacs <derefer>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by joerg_wunsch (Updated the item)
  • -unavailable- added by derefer (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 02 Jul 2009 09:12:00 AM UTCjoerg_wunschStatusNone=>Fixed
      Assigned toNone=>joerg_wunsch
      Open/ClosedOpen=>Closed
    Thu 30 Apr 2009 07:51:59 PM UTCdereferCarbon-CopyRemoved derefer=>-
    Thu 30 Apr 2009 07:50:10 PM UTCdereferCarbon-Copy-=>Added derefer

    Back to the top


    Powered by Savane 3.1-cleanup1