Package: libunac1
Version: 1.8.0-2
Severity: normal

Using Libunac.so always makes my application dieing (segfault).

The problem is new and related to the usage of gcc-4.4.
Compiling my test binary with previous version of gcc avoids the issue.

The package seems to be pretty old, but recompiling it with gcc-4.4 is
not enough to fix the issue.

The issue is also related to the optimization (-O6) and avoiding the
optimization
(-O0) fixes it.

But the root cause seems to be there:

--- unac.c.old  2009-11-15 16:02:37.000000000 +0100
+++ unac.c      2009-11-15 16:04:12.000000000 +0100
@@ -13873,9 +13873,9 @@
     *out_lengthp = 0;
   } else {
     char* utf16 = 0;
-    int utf16_length = 0;
+    size_t utf16_length = 0;
     char* utf16_unaccented = 0;
-    int utf16_unaccented_length = 0;
+    size_t utf16_unaccented_length = 0;

     if(convert(charset, utf16be(), in, in_length, &utf16,
&utf16_length) < 0) {
       return -1;

Would be interesting to know if that is in addition a gcc bug, because
gcc-4.4 only generated
following warnings:

unac.c: In function ‘unac_string’:
unac.c:13880: warning: passing argument 6 of ‘convert’ from incompatible
pointer type
unac.c:13763: note: expected ‘size_t *’ but argument is of type ‘int *’
unac.c:13884: warning: passing argument 4 of ‘unac_string_utf16’ from
incompatible pointer type
unac.c:13664: note: expected ‘size_t *’ but argument is of type ‘int *’

-- System Information:
Debian Release: squeeze/sid
  APT prefers karmic-updates
  APT policy: (500, 'karmic-updates'), (500, 'karmic-security'), (500,
'karmic')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.31-14-generic (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libunac1 depends on:
ii  libc6                   2.10.1-0ubuntu15 GNU C Library: Shared libraries

libunac1 recommends no packages.

libunac1 suggests no packages.

-- no debconf information



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to