[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avrdude-dev] [bug #46618] Arithmetic exception (SIGFPE) in ser_setspeed
From: |
anonymous |
Subject: |
[avrdude-dev] [bug #46618] Arithmetic exception (SIGFPE) in ser_setspeed |
Date: |
Sun, 06 Dec 2015 20:10:31 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux; rv:38.0) Gecko/20100101 Firefox/38.0 |
URL:
<http://savannah.nongnu.org/bugs/?46618>
Summary: Arithmetic exception (SIGFPE) in ser_setspeed
Project: AVR Downloader/UploaDEr
Submitted by: None
Submitted on: Sun 06 Dec 2015 08:10:30 PM UTC
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Name: Tom Hall
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Note: possible duplicate of #46610, but I can't say for sure, so I'll submit
it as a separate report and leave it to those who know to mark duplicates.
Using Arch Linux arm on an arm Cortex-A9 (armv7h). avrdude is version 6.2.
Attempting to program an arduino micro using the arduino-mk makefiles. It
calls avrdude with the following arguments:
avrdude -q -V -p atmega32u4 -D -c avr109 -b 57600 -P /dev/ttyACM0 -U
flash:w:build-micro/ardmk-test.hex:i
This caused a floating point exception, so I rebuilt avrdude with debug
symbols and obtained a backtrace (attached). The exception occurs in
ser_setspeed on line 158 when it attempts to divide by ss.custom_divisor,
having calculated custom_divisor as zero:
ss.custom_divisor = (ss.baud_base + (speed / 2)) / speed;
unsigned int closestSpeed = ss.baud_base / ss.custom_divisor;
In this instance, ss.baud_base == 1200 (I assume the ioctl call put it there),
speed == 57600 (from command line args), so custom_divisor is calculated as
zero (would be ~0.52 if they were real numbers instead of ints).
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Sun 06 Dec 2015 08:10:30 PM UTC Name: Backtrace 1.txt Size: 9kB By:
None
<http://savannah.nongnu.org/bugs/download.php?file_id=35654>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?46618>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [avrdude-dev] [bug #46618] Arithmetic exception (SIGFPE) in ser_setspeed,
anonymous <=