[Expat-bugs] [ expat-Bugs-1238204 ] Make check for expat-1.95.8 fails

SourceForge.net noreply at sourceforge.net
Fri Jan 13 01:24:45 CET 2006


Bugs item #1238204, was opened at 2005-07-14 09:39
Message generated for change (Comment added) made by kwaclaw
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1238204&group_id=10127

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: None
Group: Test Required
Status: Open
>Resolution: Postponed
Priority: 5
Submitted By: abhijitk (abhijitkankaria)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: Make check for expat-1.95.8 fails

Initial Comment:
I have build expat 1.95.8 on Solaris 2.8 with the follwoing 
option:
For UTF-16 output as wchar_t (incl. version/error 
strings),run:
./configure CFLAGS="-g -O2 -fshort-wchar"  
CPPFLAGS=-DXML_UNICODE_WCHAR_T

It builds successfilly, now i want to run the test for expat 
it gives the following result as below:

[me@:/mydir/expat-1.95.8] make check
gcc -g -O2 -fshort-wchar -Wall -Wmissing-prototypes -
Wstrict-prototypes -fexceptions -
DHAVE_EXPAT_CONFIG_H  -
DXML_UNICODE_WCHAR_T -I./lib -I. -o 
tests/runtests.o -c tests/runtests.c
tests/runtests.c: In function `_xml_failure':
tests/runtests.c:57: warning: char format, different type 
arg (arg 3)
tests/runtests.c: In function `_run_character_check':
tests/runtests.c:225: warning: passing arg 1 of `strlen' 
from incompatible pointer type
tests/runtests.c:225: warning: passing arg 2 of 
`XML_Parse' from incompatible pointer type
tests/runtests.c: In function `_run_attribute_check':
tests/runtests.c:242: warning: passing arg 1 of `strlen' 
from incompatible pointer type
tests/runtests.c:242: warning: passing arg 2 of 
`XML_Parse' from incompatible pointer type
tests/runtests.c: In function `test_danish_latin1':
tests/runtests.c:256: warning: passing arg 1 of 
`_run_character_check' from incompatible pointer type
tests/runtests.c:256: warning: passing arg 2 of 
`_run_character_check' from incompatible pointer type
tests/runtests.c: In function 
`test_french_charref_hexidecimal':
tests/runtests.c:268: warning: passing arg 1 of 
`_run_character_check' from incompatible pointer type
tests/runtests.c:268: warning: passing arg 2 of 
`_run_character_check' from incompatible pointer type
tests/runtests.c: In function 
`test_french_charref_decimal':
tests/runtests.c:278: warning: passing arg 1 of 
`_run_character_check' from incompatible pointer type
tests/runtests.c:278: warning: passing arg 2 of 
`_run_character_check' from incompatible pointer type
tests/runtests.c: In function `test_french_latin1':
tests/runtests.c:288: warning: passing arg 1 of 
`_run_character_check' from incompatible pointer type
tests/runtests.c:288: warning: passing arg 2 of 
`_run_character_check' from incompatible pointer type
tests/runtests.c: In function `test_french_utf8':
tests/runtests.c:298: warning: passing arg 1 of 
`_run_character_check' from incompatible pointer type
tests/runtests.c:298: warning: passing arg 2 of 
`_run_character_check' from incompatible pointer type
tests/runtests.c: In function `test_utf8_false_rejection':
tests/runtests.c:310: warning: passing arg 1 of 
`_run_character_check' from incompatible pointer type
tests/runtests.c:310: warning: passing arg 2 of 
`_run_character_check' from incompatible pointer type
tests/runtests.c: In function `test_latin1_umlauts':
tests/runtests.c:392: warning: passing arg 1 of 
`_run_character_check' from incompatible pointer type
tests/runtests.c:392: warning: passing arg 2 of 
`_run_character_check' from incompatible pointer type
tests/runtests.c:394: warning: passing arg 1 of 
`_run_attribute_check' from incompatible pointer type
tests/runtests.c:394: warning: passing arg 2 of 
`_run_attribute_check' from incompatible pointer type
tests/runtests.c: In function 
`start_element_event_handler2':
tests/runtests.c:444: warning: char format, different type 
arg (arg 3)
tests/runtests.c: In function 
`end_element_event_handler2':
tests/runtests.c:456: warning: char format, different type 
arg (arg 3)
tests/runtests.c: In function 
`testhelper_is_whitespace_normalized':
tests/runtests.c:645: warning: passing arg 1 of 
`is_whitespace_normalized' from incompatible pointer 
type
tests/runtests.c:646: warning: passing arg 1 of 
`is_whitespace_normalized' from incompatible pointer 
type
tests/runtests.c:647: warning: passing arg 1 of 
`is_whitespace_normalized' from incompatible pointer 
type
tests/runtests.c:648: warning: passing arg 1 of 
`is_whitespace_normalized' from incompatible pointer 
type
tests/runtests.c:649: warning: passing arg 1 of 
`is_whitespace_normalized' from incompatible pointer 
type
tests/runtests.c:650: warning: passing arg 1 of 
`is_whitespace_normalized' from incompatible pointer 
type
tests/runtests.c:651: warning: passing arg 1 of 
`is_whitespace_normalized' from incompatible pointer 
type
tests/runtests.c:652: warning: passing arg 1 of 
`is_whitespace_normalized' from incompatible pointer 
type
tests/runtests.c:653: warning: passing arg 1 of 
`is_whitespace_normalized' from incompatible pointer 
type
tests/runtests.c:654: warning: passing arg 1 of 
`is_whitespace_normalized' from incompatible pointer 
type
tests/runtests.c:655: warning: passing arg 1 of 
`is_whitespace_normalized' from incompatible pointer 
type
tests/runtests.c:656: warning: passing arg 1 of 
`is_whitespace_normalized' from incompatible pointer 
type
tests/runtests.c:657: warning: passing arg 1 of 
`is_whitespace_normalized' from incompatible pointer 
type
tests/runtests.c:658: warning: passing arg 1 of 
`is_whitespace_normalized' from incompatible pointer 
type
tests/runtests.c:659: warning: passing arg 1 of 
`is_whitespace_normalized' from incompatible pointer 
type
tests/runtests.c:660: warning: passing arg 1 of 
`is_whitespace_normalized' from incompatible pointer 
type
tests/runtests.c:661: warning: passing arg 1 of 
`is_whitespace_normalized' from incompatible pointer 
type
tests/runtests.c:662: warning: passing arg 1 of 
`is_whitespace_normalized' from incompatible pointer 
type
tests/runtests.c:663: warning: passing arg 1 of 
`is_whitespace_normalized' from incompatible pointer 
type
tests/runtests.c: In function 
`check_attr_contains_normalized_whitespace':
tests/runtests.c:675: warning: passing arg 2 of `strcmp' 
from incompatible pointer type
tests/runtests.c:676: warning: passing arg 2 of `strcmp' 
from incompatible pointer type
tests/runtests.c:677: warning: passing arg 2 of `strcmp' 
from incompatible pointer type
tests/runtests.c:681: warning: char format, different type 
arg (arg 3)
tests/runtests.c:681: warning: char format, different type 
arg (arg 4)
tests/runtests.c: In function `UnknownEncodingHandler':
tests/runtests.c:730: warning: passing arg 1 of `strcmp' 
from incompatible pointer type
tests/runtests.c: In function 
`external_entity_loader_set_encoding':
tests/runtests.c:774: warning: passing arg 2 of 
`XML_SetEncoding' from incompatible pointer type
tests/runtests.c: In function 
`test_ext_entity_set_encoding':
tests/runtests.c:794: warning: passing arg 1 of 
`_run_character_check' from incompatible pointer type
tests/runtests.c:794: warning: passing arg 2 of 
`_run_character_check' from incompatible pointer type
tests/runtests.c: In function `test_dtd_default_handling':
tests/runtests.c:933: warning: passing arg 1 of 
`_run_character_check' from incompatible pointer type
tests/runtests.c:933: warning: passing arg 2 of 
`_run_character_check' from incompatible pointer type
tests/runtests.c: In function `triplet_start_checker':
tests/runtests.c:1003: warning: passing arg 2 of `strcmp' 
from incompatible pointer type
tests/runtests.c:1004: warning: char format, different 
type arg (arg 3)
tests/runtests.c:1007: warning: passing arg 2 of `strcmp' 
from incompatible pointer type
tests/runtests.c:1008: warning: char format, different 
type arg (arg 3)
tests/runtests.c: In function `triplet_end_checker':
tests/runtests.c:1021: warning: passing arg 2 of `strcmp' 
from incompatible pointer type
tests/runtests.c:1023: warning: char format, different 
type arg (arg 3)
tests/runtests.c: In function `main':
tests/runtests.c:1427: warning: char format, different 
type arg (arg 2)
gcc -g -O2 -fshort-wchar -Wall -Wmissing-prototypes -
Wstrict-prototypes -fexceptions -
DHAVE_EXPAT_CONFIG_H  -
DXML_UNICODE_WCHAR_T -I./lib -I. -o 
tests/chardata.o -c tests/chardata.c
tests/chardata.c: In function `CharData_CheckString':
tests/chardata.c:96: warning: char format, different type 
arg (arg 5)
gcc -g -O2 -fshort-wchar -Wall -Wmissing-prototypes -
Wstrict-prototypes -fexceptions -
DHAVE_EXPAT_CONFIG_H  -
DXML_UNICODE_WCHAR_T -I./lib -I. -o 
tests/minicheck.o -c tests/minicheck.c
/bin/bash ./libtool --silent --mode=link gcc -g -O2 -fshort-
wchar -Wall -Wmissing-prototypes -Wstrict-prototypes -
fexceptions -DHAVE_EXPAT_CONFIG_H  -
DXML_UNICODE_WCHAR_T -I./lib -I.  -o tests/runtests 
tests/runtests.o tests/chardata.o tests/minicheck.o 
libexpatw.la
tests/runtests
Assertion failed: !is_whitespace_normalized(" abc def 
ghi", 0), file tests/runtests.c, line 649
make: *** [check] Abort (core dumped)
[me@:/mydir/expat-1.95.8]

----------------------------------------------------------------------

>Comment By: Karl Waclawek (kwaclaw)
Date: 2006-01-12 19:24

Message:
Logged In: YES 
user_id=290026

Yes, the tests are not written for non-default configurations.

"make check" should not be executed when building Expat for
UTF-16 output. 

If you like you can supply a patch to add this capability,
since I doubt any of us will have the time to do it.

----------------------------------------------------------------------

Comment By: abhijitk (abhijitkankaria)
Date: 2005-07-19 17:02

Message:
Logged In: YES 
user_id=1312629

I did some study on this and my theory is that may be the
test code of expat is not updated to support wchar_t, I have
build the expat with -fshore_wchar and -DXML_UNICODE_WCHAR_T
compiler option, but in the test code the input values to
functions are passed as XML_Char i.e wchar_t in my case,
infact this should be char as expat library takes input as
char and not wide char. 
It gives a bunch of warnings while compilation like
mentioned below and results in segmentation fault during
execution of tests.

   tests/runtests.c: In function `end_element_event_handler2':
   tests/runtests.c:456: warning: char format, different
type arg (arg 3)
   tests/runtests.c: In function  
`testhelper_is_whitespace_normalized':
   tests/runtests.c:645: warning: passing arg 1 of
`is_whitespace_normalized' from incompatible pointer type

Also when expat is build it uses the libtool to create the
library (libexpatw.la) and while compiling the tests for
expat using "make check" it used the object files created by
gcc compiler with ext .o and library created by libtool with
extension .la. 
According to the manual of libtool this type of combination
should not compile, but in this case it does compile and
result in segmentation fault while execution. I tried
modifying the make file of expat to build object files with
.lo using libtool for the test files instead of .o using gcc
compiler, but it gives the same result of segmentation fault.
	
2.	I modified the current test files for expat to have input
as char instead of XML_Char i.e. wchar_t as per the compiler
options.
Now the test (tests/runtests) of expat executes with no
segmentation fault but all of them are not successful.
[me@:/mydir/expat-1.95.8] tests/runtests
66%: Checks: 48, Failed: 16
[me@:/mydir/expat-1.95.8]


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1238204&group_id=10127


More information about the Expat-bugs mailing list