[En-Nut-Discussion] Bug in unix_emulation

Ole Reinhardt ole.reinhardt at kernelconcepts.de
Thu Apr 14 18:06:39 CEST 2005


Hi Matthias,

I found a bug in the unix emulation. Not shure what invokes this bug.

As allways I'm using the beleeding edge CVS version. Hope my gdb output
will help you a little bit? I'll also try to find it on my own
tonight...

As a test I tried to run the most simple uart example from NutOS.
rfcomm-cmd throws the same error...

My gdb output:


platon:/home/ole/work/avr/btnut/nut/app/uart# ./uart.elf
Speicherzugriffsfehler
platon:/home/ole/work/avr/btnut/nut/app/uart# gdb uart.elf
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-linux"...Using host libthread_db
library "/lib/libthread_db.so.1".

(gdb) handle SIG_USR1 noprint
Unrecognized or ambiguous flag word: "SIG_USR1".
(gdb) handle SIGUSR1 noprint
Signal        Stop      Print   Pass to program Description
SIGUSR1       No        No      Yes             User defined signal 1
(gdb) run
Starting program: /home/ole/work/avr/btnut/nut/app/uart/uart.elf
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 11543)]
[New Thread 32769 (LWP 11544)]
[New Thread 16386 (LWP 11545)]
[New Thread 32771 (LWP 11546)]
[New Thread 49156 (LWP 11547)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 49156 (LWP 11547)]
0x400ed697 in strtok () from /lib/libc.so.6
(gdb) bt
#0  0x400ed697 in strtok () from /lib/libc.so.6
#1  0x0804c769 in pgm_ptr ()
#2  0x0804b24c in UnixDevOpen (dev=0x804d0c0, name=0x0, mode=16386,
acc=0)
    at unix_devs.c:426
#3  0x0804bd15 in _open (name=0x804c3e0 "uart0", mode=16386) at
open.c:113
#4  0x0804bbba in NUT_fopen (name=0x804c3e0 "uart0", mode=0x804c3dd "r
+")
    at fopen.c:96
#5  0x0804907f in NutAppMain ()
#6  0x0804a553 in NutThreadEntry (arg=0x804d7b4) at unix_thread.c:101
#7  0x4002be51 in pthread_start_thread () from /lib/libpthread.so.0
#8  0x4002becf in pthread_start_thread_event ()
from /lib/libpthread.so.0
#9  0x4014e6ea in clone () from /lib/libc.so.6
(gdb)


Do you have an idea? Have you changed anything in the parameter
handling?

Bye,

Ole

-- 
kernel concepts    Tel: +49-271-771091-14
Dreisbachstr. 24   Fax: +49-271-771091-19
D-57250 Netphen    E+ : +49-177-7420433
--





More information about the En-Nut-Discussion mailing list