Package: apt
Version: 2.9.11
Severity: serious
Tags: ftbfs
Justification: fails to build from source (but built successfully in the past)

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
     I'm trying to package apt for Arch Linux (dependency for other
     tools like systemd's mkosi)
   * What was the outcome of this action?
     Building the package yields test failures for 2.9.11
   * What outcome did you expect instead?
     The application builds without test failures

These failures did come up:

```
[ RUN      ] URITest.AutoProxyTest
/usr/src/debug/apt/apt/test/libapt/uri_test.cc:202: Failure
Expected equality of these values:
  _config->Find("Acquire::http::proxy::www.debian.org", "")
    Which is: ""
  "http://example.com";

/usr/src/debug/apt/apt/test/libapt/uri_test.cc:206: Failure
Expected equality of these values:
  _config->Find("Acquire::http::proxy::www.debian.org", "")
    Which is: ""
  "http://example.com";

/usr/src/debug/apt/apt/test/libapt/uri_test.cc:211: Failure
Expected equality of these values:
  _config->Find("Acquire::http::proxy::www.debian.org", "")
    Which is: ""
  "http://example.com/foo";

/usr/src/debug/apt/apt/test/libapt/uri_test.cc:215: Failure
Expected equality of these values:
  _config->Find("Acquire::http::proxy::www.debian.org", "")
    Which is: ""
  "http://example.com/foo";

[  FAILED  ] URITest.AutoProxyTest (0 ms)

```

```
[ RUN      ] TreeParserTest.ParseInvalid
/usr/include/c++/14.2.1/string_view:256: constexpr const 
std::basic_string_view<_CharT, _Traits>::value_type& 
std::basic_string_view<_CharT, _Traits>::operator[](size_type) const [with 
_CharT = char; _Traits = std::char_traits<char>; const_reference = const char&; 
size_type = long unsigned int]: Assertion '__pos < this->_M_len' failed.
Aborted (core dumped)
```

Of the above crash I have retrieved the following backtrace:
```
(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>, 
signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007ffff76a5463 in __pthread_kill_internal (threadid=<optimized out>, 
signo=6) at pthread_kill.c:78
#2  0x00007ffff764c120 in __GI_raise (sig=sig@entry=6) at 
../sysdeps/posix/raise.c:26
#3  0x00007ffff76334c3 in __GI_abort () at abort.c:79
#4  0x00007ffff78d3af0 in std::__glibcxx_assert_fail 
(file=file@entry=0x7ffff7dcc4d8 "/usr/include/c++/14.2.1/string_view", 
line=line@entry=256,
    function=function@entry=0x7ffff7dcc3d8 "constexpr const 
std::basic_string_view<_CharT, _Traits>::value_type& 
std::basic_string_view<_CharT, _Traits>::operator[](size_type) const [with 
_CharT = char; _Traits = std::char_traits<char>; const_r"..., 
condition=condition@entry=0x7ffff7dc2131 "__pos < this->_M_len")
    at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/assert_fail.cc:41
#5  0x00007ffff7cc46b0 in std::basic_string_view<char, std::char_traits<char> 
>::operator[] (this=<optimized out>, __pos=<optimized out>)
    at /usr/include/c++/14.2.1/string_view:254
#6  std::basic_string_view<char, std::char_traits<char> >::operator[] 
(this=<optimized out>, __pos=<optimized out>)
    at /usr/include/c++/14.2.1/string_view:254
#7  APT::Internal::PatternTreeParser::parseShortPattern (this=<optimized out>) 
at /usr/src/debug/apt/apt/apt-pkg/cachefilter-patterns.cc:243
#8  APT::Internal::PatternTreeParser::parsePrimary 
(this=this@entry=0x7fffffffe550) at 
/usr/src/debug/apt/apt/apt-pkg/cachefilter-patterns.cc:192
#9  0x00007ffff7cc4afa in APT::Internal::PatternTreeParser::parseUnary 
(this=<optimized out>) at 
/usr/src/debug/apt/apt/apt-pkg/cachefilter-patterns.cc:172
#10 APT::Internal::PatternTreeParser::parseAnd (this=this@entry=0x7fffffffe550) 
at /usr/src/debug/apt/apt/apt-pkg/cachefilter-patterns.cc:145
#11 0x00007ffff7cc4e97 in APT::Internal::PatternTreeParser::parseOr 
(this=0x7fffffffe550) at 
/usr/src/debug/apt/apt/apt-pkg/cachefilter-patterns.cc:105
#12 APT::Internal::PatternTreeParser::parse (this=this@entry=0x7fffffffe550) at 
/usr/src/debug/apt/apt/apt-pkg/cachefilter-patterns.cc:97
#13 0x000055555563d915 in TreeParserTest_ParseInvalid_Test::TestBody 
(this=<optimized out>) at /usr/src/debug/apt/apt/test/libapt/pattern_test.cc:35
#14 0x00007ffff7f978ea in 
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void> 
(location=0x7ffff7f9faf5 "the test body",
    object=0x5555557355e0, method=<optimized out>) at 
/usr/src/debug/gtest/googletest-1.15.2/googletest/src/gtest.cc:2638
#15 testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, 
void>(testing::Test*, void (testing::Test::*)(), char const*) [clone 
.constprop.0]
    (object=0x5555557355e0, method=<optimized out>, location=0x7ffff7f9faf5 
"the test body")
    at /usr/src/debug/gtest/googletest-1.15.2/googletest/src/gtest.cc:2674
#16 0x00007ffff7f83170 in testing::Test::Run (this=0x5555557355e0) at 
/usr/src/debug/gtest/googletest-1.15.2/googletest/src/gtest.cc:2713
#17 testing::Test::Run (this=0x5555557355e0) at 
/usr/src/debug/gtest/googletest-1.15.2/googletest/src/gtest.cc:2703
#18 0x00007ffff7f8336f in testing::TestInfo::Run (this=0x5555557033e0) at 
/usr/src/debug/gtest/googletest-1.15.2/googletest/src/gtest.cc:2859
#19 0x00007ffff7f83554 in testing::TestSuite::Run (this=0x555555703500) at 
/usr/src/debug/gtest/googletest-1.15.2/googletest/src/gtest.cc:3037
#20 testing::TestSuite::Run (this=0x555555703500) at 
/usr/src/debug/gtest/googletest-1.15.2/googletest/src/gtest.cc:2991
#21 0x00007ffff7f8f709 in testing::internal::UnitTestImpl::RunAllTests 
(this=this@entry=0x5555556fd1a0)
    at /usr/src/debug/gtest/googletest-1.15.2/googletest/src/gtest.cc:5967
#22 0x00007ffff7f8fd79 in 
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
 bool> (
    location=0x7ffff7fa33c0 "auxiliary test code (environments or event 
listeners)", object=0x5555556fd1a0,
    method=(bool (testing::internal::UnitTestImpl::*)(class 
testing::internal::UnitTestImpl * const)) 0x7ffff7f8f340 
<testing::internal::UnitTestImpl::RunAllTests()>) at 
/usr/src/debug/gtest/googletest-1.15.2/googletest/src/gtest.cc:2627
#23 
testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
 bool> (
    location=0x7ffff7fa33c0 "auxiliary test code (environments or event 
listeners)", object=0x5555556fd1a0,
    method=(bool (testing::internal::UnitTestImpl::*)(class 
testing::internal::UnitTestImpl * const)) 0x7ffff7f8f340 
<testing::internal::UnitTestImpl::RunAllTests()>) at 
/usr/src/debug/gtest/googletest-1.15.2/googletest/src/gtest.cc:2674
#24 testing::UnitTest::Run (this=<optimized out>) at 
/usr/src/debug/gtest/googletest-1.15.2/googletest/src/gtest.cc:5546
#25 0x000055555559550e in RUN_ALL_TESTS () at /usr/include/gtest/gtest.h:2334
#26 main (argc=<optimized out>, argv=<optimized out>) at 
/usr/src/debug/apt/apt/test/libapt/gtest_runner.cc:14
```

I am of course curious how these issues could come up on Arch but not
debian ..

-- System Information:
Architecture: amd64 (x86_64)

Kernel: Linux 6.11.9-rc1-1home (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/bash
Init: systemd (via /run/systemd/system)

Reply via email to