|
From: Araki K. <j00...@ip...> - 2002-01-06 23:38:46
|
Hi,
Subject: [Mlterm-dev-en] Re: [I18n]Bidi on mlterm
From: Karl Koehler <ko...@or...>
Message-ID: <Pin...@r5...>
Date: Sun, 6 Jan 2002 20:53:39 +0100 (MEZ)
> I am trying to get mlterm to work here.
> I configured with --enable-fribidi --enable-debug .
> I am running on a i686 with linux-2.2.16,
> LANG=de_DE.utf8 .
> When I start mlterm-2.1.2 with the options below:
>> $ mlterm --km utf8 --bi
> It will crash quite fast:
>
> Program received signal SIGSEGV, Segmentation fault.
> search_mem_log (ptr=0x819cd98) at kik_mem.c:81
> 81 else if( kik_iterator_indirect( iterator)->ptr ==
> ptr)
> (gdb) where
> #0 search_mem_log (ptr=0x819cd98) at kik_mem.c:81
> #1 0x401414fb in kik_mem_free (ptr=0x819cd98, file=0x8069e8b "ml_char.c", line=254,
> func=0x8069f98 "ml_char_final") at kik_mem.c:168
> #2 0x080503af in ml_char_set (ch=0x809fe00, bytes=0xbffff1a4 "a", size=1, font=0x8085df8,
> font_decor=0, fg_color=MLC_FG_COLOR, bg_color=MLC_BG_COLOR) at ml_char.c:254
> #3 0x08055048 in put_char (vt100_parser=0x809ede8, ch=0xbffff1a4 "a", len=1, cs=US_ASCII,
> prop=0) at ml_vt100_parser.c:334
> #4 0x08056f2a in ml_parse_vt100_sequence (vt100_parser=0x809ede8) at ml_vt100_parser.c:2363
> #5 0x08066132 in receive_next_event (term_man=0xbffff2b4) at ml_term_manager.c:617
> #6 0x08067a69 in ml_term_manager_event_loop (term_man=0xbffff2b4) at ml_term_manager.c:1473
> #7 0x08060cff in main (argc=4, argv=0xbffff5e4) at main.c:44
> #8 0x402cb7ee in __libc_start_main () from /lib/libc.so.6
> (gdb)
>
> As others seem to have used it already, I am wandering what I'm
> doing wrong.
Thanks a lot for you report.
You didn't do anything wrong , I think , and I found a suspicious and very
critical bug around kik_list.h
Isn't this problem fixed by an attached patch ?
--
kiken
j00...@ip...
Index: src/kik_list.h
===================================================================
RCS file: /home/ken/cvsroot/kiklib/src/kik_list.h,v
retrieving revision 1.4
diff -u -r1.4 kik_list.h
--- src/kik_list.h 2001/12/01 17:28:59 1.4
+++ src/kik_list.h 2002/01/06 23:25:57
@@ -77,7 +77,7 @@
{ \
KIK_ITERATOR( type) new_iterator = NULL ; \
\
- if( ( new_iterator = malloc( sizeof( KIK_ITERATOR( type)))) == NULL) \
+ if( ( new_iterator = malloc( sizeof( *new_iterator))) == NULL) \
{ \
kik_error_printf( "malloc() failed in kik_list_insert_after().\n") ; \
abort() ; \
@@ -101,7 +101,7 @@
{ \
KIK_ITERATOR( type) new_iterator = NULL ; \
\
- if( ( new_iterator = malloc( sizeof( KIK_ITERATOR( type)))) == NULL) \
+ if( ( new_iterator = malloc( sizeof( *new_iterator))) == NULL) \
{ \
kik_error_printf( "malloc() failed in kik_list_insert_before().\n") ; \
abort() ; \
@@ -125,7 +125,7 @@
{ \
KIK_ITERATOR( type) new_iterator = NULL ; \
\
- if( ( new_iterator = malloc( sizeof( KIK_ITERATOR( type)))) == NULL) \
+ if( ( new_iterator = malloc( sizeof( *new_iterator))) == NULL) \
{ \
kik_error_printf( "malloc() failed in kik_list_insert_head().\n") ; \
abort() ; \
@@ -148,7 +148,7 @@
{ \
KIK_ITERATOR( type) new_iterator = NULL ; \
\
- if( ( new_iterator = malloc( sizeof( KIK_ITERATOR( type)))) == NULL) \
+ if( ( new_iterator = malloc( sizeof( *new_iterator))) == NULL) \
{ \
kik_error_printf( "malloc() failed in kik_list_insert_tail().\n") ; \
abort() ; \
|