xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guido Jäkel (JIRA) <xerces-c-...@xml.apache.org>
Subject [jira] Commented: (XERCESC-1809) seg fault on 64bit
Date Thu, 19 Jun 2008 07:51:45 GMT

    [ https://issues.apache.org/jira/browse/XERCESC-1809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606277#action_12606277
] 

Guido Jäkel commented on XERCESC-1809:
--------------------------------------

Dear Boris,

for completeness, i let build the Xerces-C samples, too. As expected, now they are roughly
running. 

To compare with the above, here the current strace of SAX2Count.

Guido

------------
root@leo2 /var/tmp/portage/dev-libs/xerces-c-2.8.0/work/xerces-c-src_2_8_0/samples/data #
../../bin/SAX2Count personal.xml                                                         
                             
personal.xml: 1 ms (37 elems, 12 attrs, 134 spaces, 134 chars)
root@leo2 /var/tmp/portage/dev-libs/xerces-c-2.8.0/work/xerces-c-src_2_8_0/samples/data #
strace ../../bin/SAX2Count personal.xml                                                  
                             
execve("../../bin/SAX2Count", ["../../bin/SAX2Count", "personal.xml"], [/* 36 vars */]) =
0
brk(0)                                  = 0x60a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad4e203f000
uname({sys="Linux", node="leo2", ...})  = 0
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=24304, ...}) = 0
mmap(NULL, 24304, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2ad4e2040000
close(3)                                = 0
open("/usr/lib/libxerces-c.so.28", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`t\30\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=4389840, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad4e2046000
mmap(NULL, 6488504, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ad4e2240000
mprotect(0x2ad4e262c000, 2093056, PROT_NONE) = 0
mmap(0x2ad4e282b000, 282624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3,
0x3eb000) = 0x2ad4e282b000
mmap(0x2ad4e2870000, 440, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0)
= 0x2ad4e2870000
close(3)                                = 0
open("/lib/libpthread.so.0", O_RDONLY)  = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260W\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=131577, ...}) = 0
mmap(NULL, 2204528, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ad4e2871000
mprotect(0x2ad4e2886000, 2097152, PROT_NONE) = 0
mmap(0x2ad4e2a86000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000)
= 0x2ad4e2a86000
mmap(0x2ad4e2a88000, 13168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1,
0) = 0x2ad4e2a88000
close(3)                                = 0
open("/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/libstdc++.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@6\5\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=985888, ...}) = 0
mmap(NULL, 3157792, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ad4e2a8c000
mprotect(0x2ad4e2b74000, 2097152, PROT_NONE) = 0
mmap(0x2ad4e2d74000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3,
0xe8000) = 0x2ad4e2d74000
mmap(0x2ad4e2d7d000, 73504, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1,
0) = 0x2ad4e2d7d000
close(3)                                = 0
open("/lib/libm.so.6", O_RDONLY)        = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0?\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=526472, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad4e2d8f000
mmap(NULL, 2621672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ad4e2d90000
mprotect(0x2ad4e2e10000, 2093056, PROT_NONE) = 0
mmap(0x2ad4e300f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7f000)
= 0x2ad4e300f000
close(3)                                = 0
open("/lib/libgcc_s.so.1", O_RDONLY)    = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\37\0\0\0\0\0\0"..., 832) =
832
fstat(3, {st_mode=S_IFREG|0644, st_size=55400, ...}) = 0
mmap(NULL, 2151240, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ad4e3011000
mprotect(0x2ad4e301e000, 2093056, PROT_NONE) = 0
mmap(0x2ad4e321d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xc000)
= 0x2ad4e321d000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\334\1\0\0\0\0\0"..., 832) =
832
fstat(3, {st_mode=S_IFREG|0755, st_size=1293456, ...}) = 0
mmap(NULL, 3399928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ad4e321f000
mprotect(0x2ad4e3355000, 2093056, PROT_NONE) = 0
mmap(0x2ad4e3554000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3,
0x135000) = 0x2ad4e3554000
mmap(0x2ad4e3559000, 16632, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1,
0) = 0x2ad4e3559000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad4e355e000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad4e355f000
arch_prctl(ARCH_SET_FS, 0x2ad4e355f2f0) = 0
mprotect(0x2ad4e3554000, 16384, PROT_READ) = 0
mprotect(0x2ad4e321d000, 4096, PROT_READ) = 0
mprotect(0x2ad4e300f000, 4096, PROT_READ) = 0
mprotect(0x2ad4e2d74000, 28672, PROT_READ) = 0
mprotect(0x2ad4e2a86000, 4096, PROT_READ) = 0
mprotect(0x2ad4e282b000, 110592, PROT_READ) = 0
mprotect(0x608000, 4096, PROT_READ)     = 0
mprotect(0x2ad4e223e000, 4096, PROT_READ) = 0
munmap(0x2ad4e2040000, 24304)           = 0
set_tid_address(0x2ad4e355f380)         = 15026
set_robust_list(0x2ad4e355f390, 0x18)   = 0
rt_sigaction(SIGRTMIN, {0x2ad4e2876320, [], SA_RESTORER|SA_SIGINFO, 0x2ad4e287eed0}, NULL,
8) = 0
rt_sigaction(SIGRT_1, {0x2ad4e28763a0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x2ad4e287eed0},
NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
futex(0x2ad4e2d7ec88, FUTEX_WAKE, 2147483647) = 0
brk(0)                                  = 0x60a000
brk(0x62b000)                           = 0x62b000
getcwd("/var/tmp/portage/dev-libs/xerces-c-2.8.0/work/xerces-c-src_2_8_0/samples/data", 4097)
= 78
open("/var/tmp/portage/dev-libs/xerces-c-2.8.0/work/xerces-c-src_2_8_0/samples/data/personal.xml",
O_RDONLY) = 3
mmap(NULL, 167936, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad4e2047000
fstat(3, {st_mode=S_IFREG|0644, st_size=1172, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad4e2070000
read(3, "<?xml version=\"1.0\" encoding=\"is"..., 49152) = 1172
read(3, "", 45056)                      = 0
open("/var/tmp/portage/dev-libs/xerces-c-2.8.0/work/xerces-c-src_2_8_0/samples/data/personal.dtd",
O_RDONLY) = 4
mmap(NULL, 167936, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad4e2071000
fstat(4, {st_mode=S_IFREG|0644, st_size=433, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad4e209a000
read(4, "<?xml encoding=\"ISO-8859-1\"?>\n\n<"..., 49152) = 433
read(4, "", 45056)                      = 0
read(4, "", 49152)                      = 0
close(4)                                = 0
munmap(0x2ad4e209a000, 4096)            = 0
munmap(0x2ad4e2071000, 167936)          = 0
futex(0x2ad4e321e130, FUTEX_WAKE, 2147483647) = 0
read(3, "", 49152)                      = 0
close(3)                                = 0
munmap(0x2ad4e2070000, 4096)            = 0
munmap(0x2ad4e2047000, 167936)          = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad4e2047000
write(1, "personal.xml: 2 ms (37 elems, 12"..., 63personal.xml: 2 ms (37 elems, 12 attrs,
134 spaces, 134 chars)
) = 63
exit_group(0)                           = ?
root@leo2 /var/tmp/portage/dev-libs/xerces-c-2.8.0/work/xerces-c-src_2_8_0/samples/data #


> seg fault on 64bit
> ------------------
>
>                 Key: XERCESC-1809
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1809
>             Project: Xerces-C++
>          Issue Type: Bug
>    Affects Versions: 2.8.0
>         Environment: Gentoo-Linux (emerge --version -> Portage 2.1.4.4 (default-linux/amd64/2007.0,
gcc-4.1.2, glibc-2.6.1-r0, 2.6.21-gentoo-r4 x86_64))
>            Reporter: Guido Jäkel
>
> I try to advance the Gentoo ebuild for dbxml to 2.4.13. For that, Xerces-C 2.8.0 and
XQuilla is a prerequesite. The Gentoo ebuild for Xerces-C have been tweeked to include the
patches for XQilla this days. Now i'm able to build dbxml on 32bit and 64bit. On 32bit it
seems to work from the first tests, but on 64bit even a simple "dbxml -v" dies with an segmentation
fault.
> With gdb, i got the following stack trace:
> #0 0x00002abcb1fe6c2c in ?? () from /lib/libc.so.6
> #1 0x00002abcb14f5de0 in xercesc_2_8::XMLString::parseInt () from /usr/lib/libxerces-c.so.28
> #2 0x00002abcb13b3bbd in xercesc_2_8::AbstractStringValidator::assignFacet () from /usr/lib/libxerces-c.so.28
> #3 0x00002abcb13b411d in xercesc_2_8::AbstractStringValidator::init () from /usr/lib/libxerces-c.so.28
> #4 0x00002abcb144cfe0 in xercesc_2_8::ListDatatypeValidator::ListDatatypeValidator ()
from /usr/lib/libxerces-c.so.28
> #5 0x00002abcb141837e in xercesc_2_8::DatatypeValidatorFactory::createDatatypeValidator
() from /usr/lib/libxerces-c.so.28
> #6 0x00002abcb14198f9 in xercesc_2_8::DatatypeValidatorFactory::expandRegistryToFullSchemaSet
()
> from /usr/lib/libxerces-c.so.28
> #7 0x00002abcb097e733 in XQillaPlatformUtils::initialize () from /usr/lib/libxqilla.so.4
> #8 0x00002abcb00d9fff in DbXml::Globals::initializeXmlPlatform () from /usr/lib/libdbxml-2.4.so
> #9 0x00002abcb00da53f in DbXml::Globals::initialize () from /usr/lib/libdbxml-2.4.so
> #10 0x00002abcb00df043 in DbXml::Manager::Manager () from /usr/lib/libdbxml-2.4.so
> #11 0x00002abcb00d8fca in DbXml::XmlManager::XmlManager () from /usr/lib/libdbxml-2.4.so
> #12 0x000000000040c259 in ?? ()
> #13 0x00002abcb1fd0b74 in __libc_start_main () from /lib/libc.so.6
> #14 0x000000000040ba39 in ?? ()
> #15 0x00007ffffad47148 in ?? ()
> #16 0x0000000000000000 in ?? ()
> From that, i *guess* that it break's HERE, because this looks like a libc-call to me.
> .../xerces-c-src/src/xercesc/util/XMLString.cpp:
> int XMLString::parseInt(const XMLCh* const toConvert
>                      , MemoryManager* const manager)
> {
>     // If no string, or empty string, then it is a failure
>     if ((!toConvert) || (!*toConvert))
>         ThrowXMLwithMemMgr(NumberFormatException, XMLExcepts::XMLNUM_null_ptr, manager);
>         XMLCh* trimmedStr = XMLString::replicate(toConvert, manager);
>         ArrayJanitor<XMLCh> jan1(trimmedStr, manager);
>         XMLString::trim(trimmedStr);
>     unsigned int trimmedStrLen = XMLString::stringLen(trimmedStr);
>         if ( !trimmedStrLen )
>         ThrowXMLwithMemMgr(NumberFormatException, XMLExcepts::XMLNUM_null_ptr, manager);
>         //the errno set by previous run is NOT automatically cleared
>         errno = 0;
>         char *nptr = XMLString::transcode(trimmedStr, manager);
>     ArrayJanitor<char> jan2(nptr, manager);
>     char *endptr;
>     long retVal = strtol(nptr, &endptr, 10);     <-----[HERE]
>         // check if all chars are valid char
>         if ( (endptr - nptr) != (int) trimmedStrLen)
>                 ThrowXMLwithMemMgr(NumberFormatException, XMLExcepts::XMLNUM_Inv_chars,
manager);
>         // check if overflow/underflow occurs
>     if (errno == ERANGE)
>         ThrowXMLwithMemMgr(NumberFormatException, XMLExcepts::Str_ConvertOverflow, manager);
>          //
>      // REVISIT: conversion of (long) to (int)
>          //          may truncate value on IA64
>         return (int) retVal;
> }
> May please anybody give me a hint how to get it running on 64bit? Feel free to ask for
further information you'll need,
> thank you
> Guido

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Mime
View raw message