Bug#1054376: liborcus: FTBFS on hppa - segmentation fault in orcus-test-xml-mapped

2023-11-02 Thread Rene Engelhard

Hi,

Am 01.11.23 um 16:37 schrieb John David Anglin:

The attached change fixes orcus_test_xml_mapped test on hppa hardware:
https://buildd.debian.org/status/fetch.php?pkg=liborcus=hppa=0.17.2-4=1698851675=0


Erm? Please don't tell me you apply stuff on packages extra to what's in 
the archive proper and reuse the same version number?


That's a recipe for deasaster and confusion.


Anyways, it's fixed upstream so will be in 0.19.2 whenever it will be 
released. (0.17.x in sid is dead and only will get updates for 
transitions or release-critical stuff, which is one definitely is not)


Regards,


Rene



Bug#1054376: liborcus: FTBFS on hppa - segmentation fault in orcus-test-xml-mapped

2023-11-01 Thread John David Anglin
This is orcus issue #194:
https://gitlab.com/orcus/orcus/-/issues/194

The attached change fixes orcus_test_xml_mapped test on hppa hardware:
https://buildd.debian.org/status/fetch.php?pkg=liborcus=hppa=0.17.2-4=1698851675=0

Regards,
Dave Anglin
---

Index: liborcus-0.17.2/src/orcus_test_xml_mapped.cpp
===
--- liborcus-0.17.2.orig/src/orcus_test_xml_mapped.cpp
+++ liborcus-0.17.2/src/orcus_test_xml_mapped.cpp
@@ -66,9 +66,8 @@ void test_mapped_xml_import()
 { SRCDIR"/test/xml-mapped/nested-repeats-4", false },
 };
 
-auto dump_xml_structure = [](std::string& dump_content, std::string& 
/*strm*/, const char* filepath, xmlns_context& cxt)
+auto dump_xml_structure = [](std::string& dump_content, const 
file_content& content, xmlns_context& cxt)
 {
-file_content content(filepath);
 dom::document_tree tree(cxt);
 tree.load(content.str());
 ostringstream os;
@@ -146,9 +145,10 @@ void test_mapped_xml_import()
 // input one. They should be identical.
 
 string dump_input, dump_output;
-string strm_data_file, strm_out_file; // Hold the stream content 
in memory while the namespace context is being used.
-dump_xml_structure(dump_input, strm_data_file, 
data_file.string().data(), cxt);
-dump_xml_structure(dump_output, strm_out_file, out_file.data(), 
cxt);
+// Hold the stream content in memory while the namespace context 
is being used.
+file_content strm_data_file(data_file.string()), 
strm_out_file(out_file);
+dump_xml_structure(dump_input, strm_data_file, cxt);
+dump_xml_structure(dump_output, strm_out_file, cxt);
 assert(!dump_input.empty() && !dump_output.empty());
 
 cout << dump_input << endl;



signature.asc
Description: PGP signature


Bug#1054376: liborcus: FTBFS on hppa - segmentation fault in orcus-test-xml-mapped

2023-10-23 Thread Rene Engelhard

Hi,

Am 23.10.23 um 00:10 schrieb John David Anglin:

The build fails on real hppa hardware (i.e., not qemu):
[...]
Exactly the same binary runs successfully under qemu.

Maybe there is a timing issue in the orcus::file_content::~file_content
destructor?


That is something for you as hppa porter (or upstream) to answer.


Regards,


Rene


Bug#1054376: liborcus: FTBFS on hppa - segmentation fault in orcus-test-xml-mapped

2023-10-22 Thread John David Anglin
Source: liborcus
Version: 0.17.2-4
Severity: normal
Tags: ftbfs

Dear Maintainer,

The build fails on real hppa hardware (i.e., not qemu):

FAIL orcus-test-xml-mapped (exit status: 139)


Testsuite summary for liborcus 0.17.2

# TOTAL: 10
# PASS:  9
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

Full log is here:
https://buildd.debian.org/status/fetch.php?pkg=liborcus=hppa=0.17.2-4=1697970148=0

Console output:

do_page_fault() command='orcus-test-xml-' type=15 address=0xf5aca03a in 
libc.so.6[f7429000+1bc000]
trap #15: Data TLB miss fault, vm_start = 0xf5ad4000, vm_end = 0xf5ad5000

strace output:

[...]
statx(AT_FDCWD, "../test/xml-mapped/attribute-namespace/input.xml", 
AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, 
{stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, 
stx_mode=S_IFREG|0644, stx_size=410, ...}) = 0
openat(AT_FDCWD, "../test/xml-mapped/attribute-namespace/input.xml", O_RDONLY) 
= 3
mmap2(NULL, 410, PROT_READ, MAP_SHARED, 3, 0) = 0xf7aca000
munmap(0xf56cf000, 345) = 0
close(5)= 0
openat(AT_FDCWD, "out.xml", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 5
write(5, "\n)
at /usr/include/boost/interprocess/mapped_region.hpp:276
#3  0xfa48e5d8 in orcus::file_content::impl::~impl (this=0x1e4398, 
__in_chrg=) at stream.cpp:152
#4  0xfa48e65c in std::default_delete::operator() 
(this=0xf8f02970, __ptr=0x1e4398)
at /usr/include/c++/13/bits/unique_ptr.h:99
#5  0xfa48c814 in std::unique_ptr >::~unique_ptr (
this=0xf8f02970, __in_chrg=) at 
/usr/include/c++/13/bits/unique_ptr.h:404
#6  0xfa484590 in orcus::file_content::~file_content (this=0xf8f02970, 
__in_chrg=) at stream.cpp:186
#7  0x000194d0 in operator() (__closure=0xf8f02564,

dump_content="ns0=\"http://ns-1\"\nns1=\"http://ns-2\"\n/ns0:data\n/ns0:data/ns1:entries\n/ns0:data/ns1:entries/ns1:entry\n/ns0:data/ns1:entries/ns1:entry@ns1:date-processed=\"2011-01-03\"\n/ns0:data/ns1:entries/ns1:entry@ns1:;...,
filepath=0x1e4678 "../test/xml-mapped/attribute-namespace/input.xml", 
cxt=...) at orcus_test_xml_mapped.cpp:77
#8  0x0001a0fc in (anonymous namespace)::test_mapped_xml_import () at 
orcus_test_xml_mapped.cpp:150
#9  0x0001c01c in main () at orcus_test_xml_mapped.cpp:280
(gdb) c
Continuing.

Breakpoint 2, __GI_memcmp (s1=0xf6fb5024, s2=0xf72ca03a, len=1) at memcmp.c:306
306 memcmp.c: No such file or directory.
(gdb) bt
#0  __GI_memcmp (s1=0xf6fb5024, s2=0xf72ca03a, len=1) at memcmp.c:306
#1  0x0001d65c in std::char_traits::compare (
__s1=0xf6fb5024 "a=\"http://ns-1\; xmlns:b=\"http://ns-2\;>\n
, __n=1) 
at /usr/include/c++/13/bits/char_traits.h:399
#2  0x000218d4 in std::basic_string_view 
>::compare (this=0xf8f03258,
__str=) at 
/usr/include/c++/13/string_view:345
#3  0x000206dc in std::operator== > (__x="a", 
__y=)
at /usr/include/c++/13/string_view:610
#4  0xfa666714 in std::equal_to > >::operator() (this=0x65ebc, __x="a",
__y=) at 
/usr/include/c++/13/bits/stl_function.h:378
#5  0xfa4c186c in std::__detail::_Hashtable_base >, std::pair > const, std::vector > >, std::__detail::_Select1st, 
std::equal_to > >, 
std::hash > >, 
std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, 
std::__detail::_Hashtable_traits >::_M_key_equals (
this=0x65ebc, __k="a", __n=...) at 
/usr/include/c++/13/bits/hashtable_policy.h:1728
#6  0xfa4beeb8 in std::_Hashtable >, std::pair > const, std::vector > >, std::allocator > const, std::vector > > >, std::__detail::_Select1st, 
std::equal_to > >, 
std::hash > >, 
std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, 
std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits >::find (this=0x65ebc, __k="a") at 
/usr/include/c++/13/bits/hashtable.h:1657
#7  0xfa4bc678 in std::unordered_map >, std::vector for more, q to quit, c to continue without paging--
onst*> >, std::hash > >, 
std::equal_to > >, 
std::allocator > 
const, std::vector > > > >::find 
(this=0x65ebc, __x="a") at /usr/include/c++/13/bits/unordered_map.h:876
#8  0xfa4b454c in orcus::xmlns_context::push (this=0xf8f02628, key="a", 
uri="http://ns-1;) at xml_namespace.cpp:238
#9  0xfa697e28 in 
orcus::sax_ns_parser::handler_wrapper::attribute
 (this=0xf8f02a88, attr=...)
at ../../include/orcus/sax_ns_parser.hpp:235
#10 0xfa695fd4 in 
orcus::sax_parser::handler_wrapper,
 orcus::sax_parser_default_config>::attribute (this=0xf8f02b14) at 
../../include/orcus/sax_parser.hpp:570
#11 0xfa69714c in 
orcus::sax_parser::handler_wrapper,
 orcus::sax_parser_default_config>::element_open (this=0xf8f02b14, 
begin_pos=22) at ../../include/orcus/sax_parser.hpp:290
#12 0xfa6948c8 in 
orcus::sax_parser::handler_wrapper,
 orcus::sax_parser_default_config>::element (this=0xf8f02b14) at 
../../include/orcus/sax_parser.hpp:246
#13 0xfa692da8 in