[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] [bug #52181] assert should make Serial.flush() before cal
From: |
Hannes Studeny |
Subject: |
[avr-libc-dev] [bug #52181] assert should make Serial.flush() before calling abort() |
Date: |
Fri, 6 Oct 2017 22:58:10 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0 |
URL:
<http://savannah.nongnu.org/bugs/?52181>
Summary: assert should make Serial.flush() before calling
abort()
Project: AVR C Runtime Library
Submitted by: pukuri
Submitted on: Sat 07 Oct 2017 02:58:08 AM UTC
Category: Library
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: libc code
Status: None
Percent Complete: 0%
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: Any
Fixed Release: None
_______________________________________________________
Details:
I'm quite new to this project, hopefully I'm submitting this bug at the corect
place, if not, please point me in the right direction...
if the expression in the assert function fails, a fprintf to stderr is made
and then the function abort() is called which runs in an endless loop.
The problem is, because the abort() function disables all interrupts (which is
fine), the remaining bytes in the buffer for the serial interface will not be
printed (not so good). Only the very first couple of bytes will be seen.
recomended solution: just before calling abort think about calling
Serial.flush(), or similar...
Problem with this solution is, that Serial.flush comes from the Arduino
environment and has nothing to do with libc, but on the other hand fflush()
does nothing
So, I have no real solution for this problem, but hopefully the insiders might
come up with something.
Right now the assert function is useless, because one get no information where
and why the program stops.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?52181>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [avr-libc-dev] [bug #52181] assert should make Serial.flush() before calling abort(),
Hannes Studeny <=