#41 CRASH on solaris if using C locale

open
nobody
None
5
2004-01-19
2004-01-19
Anonymous
No

rxvt revision: 2.7.10
OS version:
> uname -X
System = SunOS
Node = xxx
Release = 5.8
KernelID = Generic_108528-23
Machine = sun4u
BusType = <unknown>
Serial = <unknown>
Users = <unknown>
OEM# = 0
Origin# = 1
NumCPU = 1

Rxvt crashed (segfault) on solaris if it was started from
dtterm but worked properly when I started from an other
terminal type.

After playing with gdb and looking into the source I found
the following code snippet:

main.c:1319

/* To avoid Segmentation Fault in C locale: Solaris only?
*/
if (STRCMP(r->h->locale, "C"))
XRegisterIMInstantiateCallback(r->Xdisplay, NULL,
NULL, NULL, rxvt_IMInstantiateCallback, NULL);
}

Now I realized that dtterm uses "C" locale and the other
one uses something else.

I didn't have time to look into the details of the X library
and I am not an X programmer at all so I used "brute
force" and negated the STRCMP macro:

if (!STRCMP(r->h->locale, "C"))

I did it in init.c at line 793 as well hoping that it was just
a typo.

Now it works both in dtterm (C locale) and in the other
terminal.

Regards,

Szabolcs Kosa (skosa@freemail.hu)

Discussion