On Sun Apr 15, 2007 at 08:10:07 +0200, Martin Godisch wrote:
> On Sat, Mar 10, 2007 at 17:41:19 +0100, Adam Lackorzynski wrote:
> 
> > > > > If minicom is started with LANG=de_DE.UTF-8 and serial port is set
> > > > > wrong (wrong Bps/Par/Bits), it crashes with the following error
> > > > > message:
> > > > >
> > > > > xminicom: ../iconv/loop.c:425: internal_utf8_loop_single:
> > > > > Zusicherung »inptr - bytebuf > (state->__count & 7)« nicht erfüllt.
> 
> > It's hard for me to do anything about this since this is an assertion
> > from inside glibc. To start, I probably need to reproduce this...
> 
> Does a strace log help? The bug can be reproduced by pointing minicom to
> a fifo (with empty scriptprog, minit, mreset) and putting Mike Crowe's
> crash.cap into it.

The backtrace does not really help. I'm not sure what to do as this
looks like a glibc issue. On the other side there's #115566.
Reassign/reopen?

This little patch makes minicom crash instantly when started, when using
LANG=en_GB.UTF-8 (or another utf8 locale).

Unfortunately creating a little test program which triggers this
assertion does not seem so easy.

This issue also puts the question whether it is good to display (serial)
input with the local locale or rather use "C"? Or something
configurable? A work around for this could also be to set the locale to
"C" when outputting input data.

Any opinions?

Index: main.c
===================================================================
RCS file: /cvsroot/minicom/minicom/src/main.c,v
retrieving revision 1.16
diff -u -r1.16 main.c
--- main.c      31 Oct 2005 12:13:51 -0000      1.16
+++ main.c      15 Apr 2007 10:11:06 -0000
@@ -681,8 +681,21 @@
     /* Update the timer. */
     timer_update();
 
-    /* Check for I/O or timer. */
-    x = check_io(portfd_connected, 0, 1000, buf, &blen);
+    {
+      static int foo = 0;
+      if (!foo) {
+       x = 1;
+       buf[0] = 248;
+       buf[1] = 226;
+       buf[2] = 130;
+       buf[3] = 172;
+       buf[4] = 194;
+       buf[5] = 163;
+       blen = 6;
+       foo = 1;
+      } else
+        x = check_io(portfd_connected, 0, 1000, buf, &blen);
+    }
 
     /*  Send data from the modem to the screen. */
     if ((x & 1) == 1) {



Adam
-- 
Adam                 [EMAIL PROTECTED]
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/

Reply via email to