vcl: fdo#86307 removed Solaris workaround from #i64273#
Basically, they were working around issues with XmbTextListToTextProperty returning garbage characters, which showed on window titles. The comment in the code is far more informative than the bug report: /* #i64273# there are some weird cases when using IIIMP on Solaris where for unknown reasons XmbTextListToTextProperty results in garbage. Test one string once to ensure safety. FIXME: This must be a bug in xiiimp.so.2 somewhere. However it was not possible to recreate this in a small sample program. This reeks of memory corruption somehow. */ Now I did a bit of research (aka "Google search") and discovered #i6759# which was logged in 2002. This shows that the codebase was using __XOpenIM in xiimp.so.2, which probably caused this issue. From the bug: I've tried to look into this problem and have found out, that apparently the use of the '__XOpenIM' subroutine from the /usr/openwin/lib/locale/common/xiiimp.so.2 shared library causes this problem. When running on Solaris, OO tries to dlopen() the above mentioned shared library, looks up the '__XOpenIM' symbol in it and calls this function ( function XvaOpenIM() in file vcl/unx/source/app/i18n_wrp.cxx ). There's alternate code in OO that just calls the X11 documented function 'XOpenIM()' instead. This is enabled by running OO 1.0.x with the environment variable USE_XOPENIM defined to some value. When running OO with env USE_XOPENIM=1 ~/OpenOffice.org1.0.1/soffice the problem does *not* occur any more and xprop for the same two windows mentioned in the initial bug report shows: % xprop |egrep '_NAME|_LOCALE' WM_LOCALE_NAME(STRING) = "de_DE..ISO8859-15" WM_ICON_NAME(STRING) = "unbenannt1 - OpenOffice.org 1.0.1 " WM_NAME(STRING) = "unbenannt1 - OpenOffice.org 1.0.1 " % xprop | egrep '_NAME|_LOCALE' WM_LOCALE_NAME(STRING) = "de_DE..ISO8859-15" WM_ICON_NAME(STRING) = "Umbruch einfÿ77777774gen" WM_NAME(STRING) = "Umbruch einfÿ77777774gen" As far as I can tell, the use of '__XOpenIM' frees some memory inside the Solaris X11 shared library that is still in use by the X11 character set conversion routines. Or in other words: the X11 character set conversion routines operate on freed memory, after __XOpenIM was called. These character set conversion routines are used by XmbTextListToTextProperty ( in WMAdaptor::setWMName() in file vcl/unx/source/app/wmadaptor.cxx ) and it seems they still access memory that was freed by the use of '__XOpenIM'. Now later on, Caolan removed XvaOpenIM() in commit 4d6dab2c and then later committed a patch that removed the ability to use the environment variable USE_XOPENIM as it wasn't necessary anymore (commit: 8b028754). I'd say that this was probably fixed in one of these changes. Change-Id: I20effd77e0cdcde26d1be756cc6231f30f35118e
Showing
Please
register
or
sign in
to comment