Re: Segfault: ?


Subject: Re: Segfault: ?
From: Vlad Harchev (hvv@hippo.ru)
Date: Wed Nov 15 2000 - 03:48:06 CST


On Mon, 13 Nov 2000, Pierre Abbat wrote:

 Hi,

> On Mon, 13 Nov 2000, Martin Sevior wrote:
> >HI David,
> > You need to run the AbiWord script to set your font paths
> >correctly. Otherwise crash and burn. I just did a fresh build on my RH
> >6.2. No problems. What distro do you use? We've had real iconv issues
> >recently.
>
> I just blew away my entire previously downloaded source (except the Makefile
> for testing LaTeX) and redownloaded the source from scratch, made, installed,
> and got the same error as before. I ran abiword (the shell script) and it
> crashed. I debugged it and it crashed in iconv. Here's the current stack dump:
>
> (gdb) run
> Starting program: /usr/local/AbiSuite/bin/AbiWord_d
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x403bade4 in iconv (cd=0x82fd370, inbuf=0x0, inbytesleft=0x0, outbuf=0x0,
> outbytesleft=0x0) at iconv.c:41
> 41 iconv.c: No such file or directory.
> (gdb) where
> #0 0x403bade4 in iconv (cd=0x82fd370, inbuf=0x0, inbytesleft=0x0, outbuf=0x0,
> outbytesleft=0x0) at iconv.c:41
> #1 0x812c029 in try_UToC ()
> #2 0x812c09b in XAP_EncodingManager::try_UToNative ()
> #3 0x812bb49 in XAP_EncodingManager::UToNative ()
> #4 0x812c6a5 in XAP_EncodingManager::initialize ()
> #5 0x812ba7f in XAP_EncodingManager::XAP_EncodingManager ()
> #6 0x81246a7 in XAP_App::XAP_App ()
> #7 0x811bfdc in XAP_UnixApp::XAP_UnixApp ()
> #8 0x809ec2b in AP_UnixApp::AP_UnixApp ()
> #9 0x80a05f3 in AP_UnixApp::main ()
> #10 0x809ec07 in main ()
> #11 0x403309ee in __libc_start_main (main=0x809ebb4 <main>, argc=1,
> argv=0xbffff9e4, init=0x809cbec <_init>, fini=0x81cafb0 <_fini>,
> rtld_fini=0x4000a570 <_dl_fini>, stack_end=0xbffff9dc)
> at ../sysdeps/generic/libc-start.c:90
> (gdb) quit
> The program is running. Exit anyway? (y or n) y
>
> Don't release 0.7.12 until this is fixed. I am using Linux Mandrake 7.0; if you
> need to know any particular library version, ask me.

 May be glibc is buggy in MDK as usual?

 I think we can use the following workaround for this problem:
instead of
        iconv(handle,NULL,NULL,NULL,NULL);
everywhere use
        iconv_reset(handle)
where it's defined as follows:

void iconv_reset(iconv_t cd)
{
        if (XAP_EncodingManager::instance->cjk_locale())
                iconv(cd,NULL,NULL,NULL,NULL);
}

 since shift state (and its resetting) is meaningful only on multibyte locales
such as CJK ones.

 What do you guys think about this idea?

> phma
>

 Best regards,
  -Vlad



This archive was generated by hypermail 2b25 : Wed Nov 15 2000 - 04:08:11 CST