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 602093 - libgstcheck fails to export some symbols when built under et_EE locale
libgstcheck fails to export some symbols when built under et_EE locale
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.26
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-11-16 13:46 UTC by Priit Laes (IRC: plaes)
Modified: 2009-11-18 19:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gstreamer-fix-et_EE-regexp.patch (1.62 KB, patch)
2009-11-16 13:49 UTC, Priit Laes (IRC: plaes)
none Details | Review
gstreamer-regexp.patch (1.65 KB, patch)
2009-11-16 15:04 UTC, Priit Laes (IRC: plaes)
none Details | Review
gstreamer-regexp-v3.patch (1.73 KB, patch)
2009-11-16 15:38 UTC, Priit Laes (IRC: plaes)
none Details | Review

Description Priit Laes (IRC: plaes) 2009-11-16 13:46:07 UTC
When linking gstcheck library, the list of symbols are checked against regexp containing A-Z and a-z character ranges. This fails under et_EE locale because Z in Estonian alphabet is located after S and therefore characters starting with TUV... are not in the range anymore.

Here's a diff between symbol dumps from libgstcheck library, one is built under C locale, another under et_EE. Please not that I have omitted symbol addresses.

The first character in the list describes symbol type - uppercase characters means it is exported, lowercase means it is not exported:

[snip]
--- built-with-C.txt    2009-11-16 15:17:15.000000000 +0200
+++ built-with-et_EE.txt        2009-11-16 15:16:51.000000000 +0200
@@ -24,7 +24,7 @@
 U __vsnprintf_chk@@GLIBC_2.3.4
 a _edata
 a _end
-T _fail_unless
+t _fail_unless
 t _fini
 d _fstat
 b _gst_check_debug
@@ -35,8 +35,8 @@
 B _gst_check_threads_running
 U _gst_debug_category_new
 t _init
-T _mark_point
-T _tcase_add_test
+t _mark_point
+t _tcase_add_test
 U abort@@GLIBC_2.2.5
 U alarm@@GLIBC_2.2.5
 b alarm_received
...
[/snip]
Comment 1 Priit Laes (IRC: plaes) 2009-11-16 13:49:21 UTC
Created attachment 147886 [details] [review]
gstreamer-fix-et_EE-regexp.patch
Comment 2 Tim-Philipp Müller 2009-11-16 14:01:44 UTC
Amusing bug :)

I think I'd favour the more verbose but possibly safer option of just putting ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz directly into the regex line instead of using shell variables there. A comment above 'print-check-symbols:' why we're not using a-z etc. would also be good, to make sure no one goes and 'cleans this up' in a few weeks.
Comment 3 Tim-Philipp Müller 2009-11-16 14:03:10 UTC
PS: and please add an explanation to the commit message why the current code fails.
Comment 4 Priit Laes (IRC: plaes) 2009-11-16 15:04:03 UTC
Created attachment 147898 [details] [review]
gstreamer-regexp.patch

Now comes with extra warning :)
Unfortunately I couldn't figure out how to get rid of the duplication...
Comment 5 Priit Laes (IRC: plaes) 2009-11-16 15:38:23 UTC
Created attachment 147901 [details] [review]
gstreamer-regexp-v3.patch

Added description about the issue to commit message and removed duplication.
Comment 6 Tim-Philipp Müller 2009-11-18 19:23:53 UTC
Committed, thanks for the patch!

 commit 6b234d7ce4b687912e4778327945c64743db90ea
 Author: Priit Laes <plaes@plaes.org>
 Date:   Mon Nov 16 15:47:57 2009 +0200

    check: fix symbol exporting when building under et_EE locale
    
    [A-Z] regexp fails under et_EE locale because Z in Estonian alphabet is
    located after S and therefore characters starting with 'TUV...' are not
    in the range anymore.
    
    Fixes bug #602093.