avr-libc-dev
[Top][All Lists]
Advanced

[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: Georg-Johann Lay
Subject: [avr-libc-dev] [bug #52181] assert should make Serial.flush() before calling abort()
Date: Sun, 8 Oct 2017 05:34:46 -0400 (EDT)
User-agent: Opera/9.80 (Windows NT 5.0; U; de) Presto/2.6.30 Version/10.63

Follow-up Comment #1, bug #52181 (project avr-libc):

This is not an avr-libc problem.  The stdio routines like prinf are fully
synchronous, and there is no buffering.

Hence any buffering must emerge from the applicaton's stream implementation,
i.e. from the callbacks you are providing with FDEV_SETUP_STREAM or by similar
means.

One fix is to provide a destructor for your static buffering object.  abort
will call _exit which will run all the static destructors and all the
functions registered with atexit.

Beside thar, gnu tools allow to provide own static destructors even for C, and
avr tool allow to override abort, _exit and exit and to run own shutdown code
located in dedicated sections .fini9 ... .fini0.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?52181>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]