From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Description of problem:
When I run 'make check' in libunicode source directory I receive failed
(sometimes with segmentaton fault, sometimes just failed) test roundtrip.
Because failed builtin-test means possible bug in application, I've
investigated the fault's reason and found that there is just the bug in test.
In roundtrip.c unicode_iconv function is used in line 53. unicode_iconv
function requires pointers to size_t variables describing sizes of input and
output buffers (size_t *inbytesleft, size_t *outbytesleft in unicode_iconv
declaration (convert.c:142)), but reference to int variables (int from_size,
to_size; - declared int roundtrip.c:36) is passed as parameters. On IA64 int is
32bit width while size_t is 64bit width, so elder 32bits of size variables in
unicode_iconv is used uninitialized. Because of it enormously big values income
into unicode_iconv and program fails with segm fault or works incorrectly
trying to process a lot of memory. That's bug that should fixed in test suite -
I'll attach the patch, which changes type of from_size and to_size variables
from int to size_t. With it libunicode becomes pass 'make check'.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. 'make check' in libunicode source directory
Actual Results: ...
1 of 6 tests failed
Expected Results: ...
All 6 tests passed
Created attachment 82205 [details]
Patch to fix type of size variables in roundtrip test
Also I encountered such error in other two test. I'll attach patch to fix them
(int is changed size_t where necessary).
Created attachment 82206 [details]
Patch to fix problem with using 32bit types when 64bit needed
libunicode is neither maintained upstream or used for almost
anything in the distribution. (The dia diagramming package
is the sole exception.)
None-the-less committed the patch to GNOME CVS (I was the
last upstream maintainer, as it turns out) and put it
in our package.