GNOME Bugzilla – Bug 343919
gunicollate.c: strxfrm bug on VC8
Last modified: 2006-06-08 15:24:34 UTC
Please describe the problem: The C runtime library with Microsoft Visual C++ had a bug at strxfrm. KB274501 http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B274501 It was repaired by Service Pack provided from Microsoft. But the repaired bug revived since Visual C++ 8.0. I wrote a simple sample code. Please read it and watch its results. This is a work of Microsoft. But I think that we also should fix for this bug. I suggest that we add a code to gunicollate.c for this. Steps to reproduce: 1. compile GLib with Visual C++ 2005 Express Edition 2. run testfilechooser.exe and so on. Actual results: msvcr80.dll move a value to 00000000h. The application crashed. (Please watch screenshots.) Expected results: Add a code to gunicollate.c for this bug. Does this happen every time? Other information:
Created attachment 66776 [details] simple sample code for strxfrm Input following commands. C:\>cl strxfrm.c C:\>strxfrm.exe
Created attachment 66778 [details] screenshot: run strxfrm.exe on Visual C++ 6.0 and Service Pack 6
Created attachment 66779 [details] screenshot: run strxfrm.exe on Visual C++ 2005 Express Edition
Created attachment 66780 [details] [review] patch for gunicollate.c
Fixed in HEAD and glib-2-10: 2006-06-08 Tor Lillqvist <tml@novell.com> * glib/gunicollate.c (msc_strxfrm_wrapper): Workaround for bug in strxfrm() in Microsoft's newer C runtimes. (#343919, Kazuki Iwamoto)