From: "James Kahkoska" <jkahkoska@wire-less-inc.com>
To: <ecos-discuss@sourceware.cygnus.com>
Subject: [ECOS] assertion error in stdio
Date: Mon, 10 Jul 2000 14:22:00 -0000 [thread overview]
Message-ID: <007c01bfeab5$4adc6080$01b5a8c0@JamesLaptop> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2254 bytes --]
I am having a problem with eCos when I turn on
asserts in eCos. I thought everything I/O related was working ok but when I
turn on assertions, I get the following assertion error:
Â
ASSERT FAIL:
stream.cxx         [ 79]
Cyg_StdioStream::Cyg_StdioStream() Attempt to open invalid
device!
Â
The call stack looks
like hal_misc.c\cyg_hal_invoke_constructors() Line #92 (0x0001C930) Â
stdout.cxx\global constructors keyed to 50000.cyg_libc_stdio_stdout() Line #90
(0x00020240) Â Â Â
stdiofiles.inl\__static_initialization_and_destruction_0() Line #83
(0x000200DC) Â Â Â Â Â
stream.cxx\Cyg_StdioStream::Cyg_StdioStream(void *, Cyg_StdioStream::OpenMode,
bool, bool, int, unsigned int, unsigned char *)() Line #82
(0x00020328) Â Â Â Â Â Â Â
buffer.cxx\cyg_assert_fail() Line #741 (0x0001DE84)
Â
It appears the Cyg_StdioStream::Cyg_StdioStream
contructor is being passed a NULL for the device and the assertion catches
that. I went further into the code and this originates in stdout.cxx
cyg_libc_stdio_stdout() Line #90
Â
 // And here's an instance of the class just
to make the code run  static cyg_libc_dummy_stdout_init_class
cyg_libc_dummy_stdout_init  Â
                                     Â
CYG_INIT_PRIORITY(LIBC)
Â
The constructor ends up calling callingÂ
Â
 Cyg_libc_stdio_files::set_file_stream( fd_t
fd, Cyg_StdioStream *stream )
Â
which invokes the
Cyg_StdioStream::Cyg_StdioStream(cyg_io_handle_t dev, constructor with a null
device. Â Â Â CYG_CHECK_DATA_PTR(dev, "Attempt to open
invalid device!");
Â
Without asserts enabled my printf's to stdout seem
to work fine. I am not sure about this dummy class and single static instance
that causes the assertion to fail. The comment is my only clue to it's
existence:
Â
// This is a dummy class just so we can execute
arbitrary code when // stdout is requested
Â
Any ideas as to why I need this dummy class or why
it might be blowing up?
Â
Thanks, James
Â
Â
James Kahkoska jkahkoska@wire-less-inc.com 719-528-8885
x104
next reply other threads:[~2000-07-10 14:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-07-10 14:22 James Kahkoska [this message]
2000-07-11 6:37 ` Bart Veer
2000-07-11 6:43 ` Dave Airlie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='007c01bfeab5$4adc6080$01b5a8c0@JamesLaptop' \
--to=jkahkoska@wire-less-inc.com \
--cc=ecos-discuss@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).