After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 343919 - gunicollate.c: strxfrm bug on VC8
gunicollate.c: strxfrm bug on VC8
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: win32
unspecified
Other All
: Normal critical
: ---
Assigned To: gtk-win32 maintainers
gtk-win32 maintainers
Depends on:
Blocks:
 
 
Reported: 2006-06-05 15:01 UTC by Kazuki Iwamoto
Modified: 2006-06-08 15:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
simple sample code for strxfrm (173 bytes, text/x-c)
2006-06-05 15:04 UTC, Kazuki Iwamoto
  Details
screenshot: run strxfrm.exe on Visual C++ 6.0 and Service Pack 6 (34.83 KB, image/jpeg)
2006-06-05 15:06 UTC, Kazuki Iwamoto
  Details
screenshot: run strxfrm.exe on Visual C++ 2005 Express Edition (50.96 KB, image/jpeg)
2006-06-05 15:08 UTC, Kazuki Iwamoto
  Details
patch for gunicollate.c (644 bytes, patch)
2006-06-05 15:10 UTC, Kazuki Iwamoto
none Details | Review

Description Kazuki Iwamoto 2006-06-05 15:01:33 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:
Comment 1 Kazuki Iwamoto 2006-06-05 15:04:34 UTC
Created attachment 66776 [details]
simple sample code for strxfrm

Input following commands.

C:\>cl strxfrm.c
C:\>strxfrm.exe
Comment 2 Kazuki Iwamoto 2006-06-05 15:06:54 UTC
Created attachment 66778 [details]
screenshot: run strxfrm.exe on Visual C++ 6.0 and Service Pack 6
Comment 3 Kazuki Iwamoto 2006-06-05 15:08:21 UTC
Created attachment 66779 [details]
screenshot: run strxfrm.exe on Visual C++ 2005 Express Edition
Comment 4 Kazuki Iwamoto 2006-06-05 15:10:13 UTC
Created attachment 66780 [details] [review]
patch for gunicollate.c
Comment 5 Tor Lillqvist 2006-06-08 15:24:34 UTC
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)