Skip to content

Some tests fail with Illegal Instruction caused by an assertion (SIGILL) #3415

@yurivict

Description

@yurivict

Does this problem persist on the current main?

  • I have verified the issue on the current main

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

96% tests passed, 14 tests failed out of 315

Total Test time (real) =  21.86 sec

The following tests FAILED:
        234 - search/search_collection_test (ILLEGAL)
        236 - search/search_scheme_algorithm_test (ILLEGAL)
        238 - search/search_test (ILLEGAL)
        244 - search/fm_index/fm_index_dna4_test (ILLEGAL)
        245 - search/fm_index/bi_fm_index_dna4_test (ILLEGAL)
        246 - search/fm_index/bi_fm_index_aa27_test (ILLEGAL)
        247 - search/fm_index/bi_fm_index_char_test (ILLEGAL)
        248 - search/fm_index_cursor/fm_index_cursor_test (ILLEGAL)
        249 - search/fm_index_cursor/fm_index_cursor_collection_test (ILLEGAL)
        250 - search/fm_index_cursor/bi_fm_index_cursor_test (ILLEGAL)
        251 - search/fm_index_cursor/bi_fm_index_cursor_collection_test (ILLEGAL)
        252 - search/fm_index_cursor/extend_bitpacked_query_sequence_test (ILLEGAL)
        260 - test/expect_same_type_test (Failed)
        278 - utility/detail/type_name_as_string_test (Failed)

For example .test/search/fm_index_cursor/bi_fm_index_cursor_collection_test crashes here:

230│
231│   // 27.6.2.3.2 Get area:
232│   _LIBCPP_HIDE_FROM_ABI char_type* eback() const { return __binp_; }
233│   _LIBCPP_HIDE_FROM_ABI char_type* gptr() const { return __ninp_; }
234│   _LIBCPP_HIDE_FROM_ABI char_type* egptr() const { return __einp_; }
235│
236│   inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 void gbump(int __n) { __ninp_ += __n; }
237│
238│   inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1 void setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) {
239├───> _LIBCPP_ASSERT_VALID_INPUT_RANGE(std::__is_valid_range(__gbeg, __gnext), "[gbeg, gnext) must be a valid range");
240│     _LIBCPP_ASSERT_VALID_INPUT_RANGE(std::__is_valid_range(__gbeg, __gend), "[gbeg, gend) must be a valid range");
241│     _LIBCPP_ASSERT_VALID_INPUT_RANGE(std::__is_valid_range(__gnext, __gend), "[gnext, gend) must be a valid range");
242│     __binp_ = __gbeg;
243│     __ninp_ = __gnext;
244│     __einp_ = __gend;
245│   }
246│
247│   // 27.6.2.3.3 Put area:
248│   _LIBCPP_HIDE_FROM_ABI char_type* pbase() const { return __bout_; }
249│   _LIBCPP_HIDE_FROM_ABI char_type* pptr() const { return __nout_; }
250│   _LIBCPP_HIDE_FROM_ABI char_type* epptr() const { return __eout_; }
1747│             pbump64(n);
 1748│             return n;
 1749│         }
 1750│         else
 1751│         {
 1752│             if (epptr() - pbase() == (std::ptrdiff_t)m_ram_file->size() and epptr() == pptr())
 1753│             {
 1754│                 m_ram_file->insert(m_ram_file->end(), s, s + n);
 1755│                 setp(m_ram_file->data(), m_ram_file->data() + m_ram_file->size());
 1756│                 std::ptrdiff_t add = epptr() - pbase();
 1757│                 pbump64(add);
 1758├───────────────> setg(m_ram_file->data(), gptr(), m_ram_file->data() + m_ram_file->size());
 1759│                 return n;
 1760│             }
 1761│             else
 1762│             {
 1763│                 for (std::streamsize i = 0; i < n; ++i)
 1764│                 {
 1765│                     if (traits_type::eq_int_type(sputc(s[i]), traits_type::eof()))
 1766│                     {
 1767│                         return i;
 1768│                     }
 1769│                 }
 3130│ template <typename T>
 3131│ size_t write_member(T const & t, std::ostream & out, seqan3::contrib::sdsl::structure_tree_node * v = nullptr, std::string name = "")
 3132│ {
 3133│     seqan3::contrib::sdsl::structure_tree_node * child = seqan3::contrib::sdsl::structure_tree::add_child(v, name, util::class_name(t));
 3134├───> out.write((char *)&t, sizeof(t));
 3135│     size_t written_bytes = sizeof(t);
 3136│     seqan3::contrib::sdsl::structure_tree::add_size(child, written_bytes);
 3137│     return written_bytes;
 3138│ }
 3139│ template <>
 3140│ inline size_t
 3141│ write_member<std::string>(std::string const & t, std::ostream & out, seqan3::contrib::sdsl::structure_tree_node * v, std::string name)
#0  std::__1::basic_streambuf<char, std::__1::char_traits<char> >::setg[abi:se190107](char*, char*, char*) (this=0x800c0f0a0, __gbeg=0x800c1f210 "\250", __gnext=0x0, __gend=0x800c1f218 "")
    at /usr/include/c++/v1/streambuf:239
#1  0x00000000002d6abd in seqan3::contrib::sdsl::ram_filebuf::xsputn (this=0x800c0f0a0, s=0x7fffffff6820 "\250", n=8) at /usr/ports/biology/seqan3/work/seqan3-3.4.2/include/seqan3/contrib/sdsl-lite.hpp:1758
#2  0x0000000800565796 in std::__1::basic_ostream<char, std::__1::char_traits<char> >::write(char const*, long) () from /lib/libc++.so.1
#3  0x00000000002c6a4d in seqan3::contrib::sdsl::write_member<unsigned long> (t=@0x7fffffff6820: 576460752303423656, out=..., v=0x0, name="")
    at /usr/ports/biology/seqan3/work/seqan3-3.4.2/include/seqan3/contrib/sdsl-lite.hpp:3134
#4  0x00000000002dce48 in seqan3::contrib::sdsl::int_vector<(unsigned char)8>::write_header (size=168, int_width=8 '\b', out=...) at /usr/ports/biology/seqan3/work/seqan3-3.4.2/include/seqan3/contrib/sdsl-lite.hpp:5392
#5  0x00000000002d5bec in seqan3::contrib::sdsl::int_vector<(unsigned char)8>::serialize (this=0x7fffffff6c28, out=..., v=0x0, name="")
    at /usr/ports/biology/seqan3/work/seqan3-3.4.2/include/seqan3/contrib/sdsl-lite.hpp:6260
#6  0x00000000002d4bb7 in seqan3::contrib::sdsl::store_to_file<(unsigned char)8> (v=..., file="@50499_0") at /usr/ports/biology/seqan3/work/seqan3-3.4.2/include/seqan3/contrib/sdsl-lite.hpp:3826
#7  0x00000000002d2477 in seqan3::contrib::sdsl::construct_im<seqan3::contrib::sdsl::csa_wt<seqan3::contrib::sdsl::wt_pc<seqan3::contrib::sdsl::balanced_shape, seqan3::contrib::sdsl::int_vector<(unsigned char)1>, seqan3::con
trib::sdsl::rank_support_v<(unsigned char)1, (unsigned char)1>, seqan3::contrib::sdsl::select_support_scan<(unsigned char)1, (unsigned char)1>, seqan3::contrib::sdsl::select_support_scan<(unsigned char)0, (unsigned char)1>,
seqan3::contrib::sdsl::byte_tree<false> >, 16u, 10000000u, seqan3::contrib::sdsl::sa_order_sa_sampling<(unsigned char)0>, seqan3::contrib::sdsl::isa_sampling<(unsigned char)0>, seqan3::contrib::sdsl::plain_byte_alphabet>, se
qan3::contrib::sdsl::int_vector<(unsigned char)8>&> (idx=..., data=..., num_bytes=0 '\000') at /usr/ports/biology/seqan3/work/seqan3-3.4.2/include/seqan3/contrib/sdsl-lite.hpp:21017
#8  0x00000000002d149a in _ZN6seqan38fm_indexINS_4dna4ELNS_11text_layoutE1ENS_7contrib4sdsl6csa_wtINS4_5wt_pcINS4_14balanced_shapeENS4_10int_vectorILh1EEENS4_14rank_support_vILh1ELh1EEENS4_19select_support_scanILh1ELh1EEENSC
_ILh0ELh1EEENS4_9byte_treeILb0EEEEELj16ELj10000000ENS4_20sa_order_sa_samplingILh0EEENS4_12isa_samplingILh0EEENS4_19plain_byte_alphabetEEEE9constructITkNSt3__16ranges5rangeERNSQ_6vectorINSS_IS1_NSQ_9allocatorIS1_EEEENST_ISV_E
EEEQeqT0_LS2_1EEEvOT_b (this=0x7fffffff7ce8, text=std::vector of length 2 = {...}, reverse=false) at /usr/ports/biology/seqan3/work/seqan3-3.4.2/include/seqan3/search/fm_index/fm_index.hpp:373
#9  0x00000000002d0d65 in _ZN6seqan38fm_indexINS_4dna4ELNS_11text_layoutE1ENS_7contrib4sdsl6csa_wtINS4_5wt_pcINS4_14balanced_shapeENS4_10int_vectorILh1EEENS4_14rank_support_vILh1ELh1EEENS4_19select_support_scanILh1ELh1EEENSC
_ILh0ELh1EEENS4_9byte_treeILb0EEEEELj16ELj10000000ENS4_20sa_order_sa_samplingILh0EEENS4_12isa_samplingILh0EEENS4_19plain_byte_alphabetEEEEC2ITkNSt3__16ranges19bidirectional_rangeERNSQ_6vectorINSS_IS1_NSQ_9allocatorIS1_EEEENS
T_ISV_EEEEEEOT_ (this=0x7fffffff7ce8, text=std::vector of length 2 = {...}) at /usr/ports/biology/seqan3/work/seqan3-3.4.2/include/seqan3/search/fm_index/fm_index.hpp:454
#10 0x00000000002be668 in _ZN6seqan311bi_fm_indexINS_4dna4ELNS_11text_layoutE1ENS_7contrib4sdsl6csa_wtINS4_5wt_pcINS4_14balanced_shapeENS4_10int_vectorILh1EEENS4_14rank_support_vILh1ELh1EEENS4_19select_support_scanILh1ELh1EE
ENSC_ILh0ELh1EEENS4_9byte_treeILb0EEEEELj16ELj10000000ENS4_20sa_order_sa_samplingILh0EEENS4_12isa_samplingILh0EEENS4_19plain_byte_alphabetEEEE9constructITkNSt3__16ranges5rangeERNSQ_6vectorINSS_IS1_NSQ_9allocatorIS1_EEEENST_I
SV_EEEEEEvOT_ (this=0x7fffffffc238, text=std::vector of length 2 = {...}) at /usr/ports/biology/seqan3/work/seqan3-3.4.2/include/seqan3/search/fm_index/bi_fm_index.hpp:120
#11 0x00000000002bdd67 in _ZN6seqan311bi_fm_indexINS_4dna4ELNS_11text_layoutE1ENS_7contrib4sdsl6csa_wtINS4_5wt_pcINS4_14balanced_shapeENS4_10int_vectorILh1EEENS4_14rank_support_vILh1ELh1EEENS4_19select_support_scanILh1ELh1EE

Expected Behavior

n/a

Steps To Reproduce

build + tests

Environment

- Operating system: FreeBSD 15 STABLE
- SeqAn version: 3.4.2
- Compiler: clabg-19

Anything else?

No response

Metadata

Metadata

Assignees

Labels

bugfaulty or wrong behaviour of code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions