You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Andy Hird <an...@internal.schools.net.au> on 2000/06/14 04:50:46 UTC

RE: [xalan-c] segmentation fault in addAttribute (and a fixes for Linux build)

Hi there, Just hit this myself.

The problem is that inside AttributeListImpl::addAttribute (line 428) theEntry
is being released and then its being used on line 431. You just need to change
theEntry on line 431 to entry to fix.

I suspect this only repros when you're not using std::auto_ptr and have
XALAN_OLD_AUTO_PTR defined.

Diffs to fix:

diff -r1.7 AttributeListImpl.cpp
431c431
<              
m_AttributeKeyMap.insert(AttributeKeyMapType::value_type(theEntry->m_Name.begin(
), entry));
---
>              
m_AttributeKeyMap.insert(AttributeKeyMapType::value_type(entry->m_Name.begin(),
entry));

I've also had problems compiling PlatformSupport/DOMStringHelper.cpp with gcc
2.95.2 (under Debian potato 2.2.14). DomStringCompare seems to be missing a
return type. Another diff:

diff -r1.24 DOMStringHelper.cpp
737a738
> XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(int)


Thanks
Andy Hird



On 10-Jun-2000 Kensuke Ishida wrote:
> Nice to meet you, all.
> 
> I got xerces-c 1_2 and xalan-c 0_30 from CVS, and successfully built them.
> (Linux 2.2.15 / glibc 2.1.12 / gcc2.95.2)
> 
> But, testXSLT makes a segmentation fault at
> AttributeListImpl::addAttribute()
> 
> <<<
> %./testXSLT -in foo.xml -xsl foo.xsl
> ========= Parsing foo.xsl ==========
> segmantation fault
> 
>#1  0x2ac2ad47 in AttributeListImpl::addAttribute (this=0x7fffe844,
>     name=0x80775e8, type=0x8091880, value=0x8091868)
>     at PlatformSupport/AttributeListImpl.cpp:431
> 
> It seems to be adding ("match", "CDATA", "*").
>>>>
> 
> Would anyone tell me how to fix this problem?
> 
> ---
> Kensuke Ishida (ishida@dreamarts.co.jp)