Skip to content
This repository was archived by the owner on Oct 18, 2022. It is now read-only.
This repository was archived by the owner on Oct 18, 2022. It is now read-only.

Segmentation fault when traversing object of type SuffixTreeY #1

@skuruppu

Description

@skuruppu

I was attempting to construct a compressed suffix tree for this DNA sequence.

The suffix array is constructed successfully (at least I think so) but as soon as you invoke any methods that requires traversing the tree, a segmentation fault occurs. For example, invoking the following method call

cst->Child(node_vl, node_vr, 'c', &next_vl, &next_vr);

where node_vl and node_vr are obtained from cst->Root(), causes a segmentation fault.

The following methods were invoked to construct the suffix tree.

SuffixTree *cst;
SuffixTreeY csty(text, length, DAC, CN_NPR, 32);
cst = &csty;

The stack trace from gdb is as follows:
#0 0x00000000004086fa in cds_utils::get_field_64 (A=0xfe2820, len=6, index=65836) at ../includes/libcdsTrees.h:26
#1 0x0000000000411354 in cds_static::NPR_CN::find_RMQ (this=0xfc77e0, x=1, y=11309, r=1, min_r=0x7fffa70200e0)

at static/suffixtree/NPR_CN.cpp:413

#2 0x00000000004112c9 in cds_static::NPR_CN::find_RMQ (this=0xfc77e0, x=1, y=361925, r=0, min_r=0x7fffa7020198)

at static/suffixtree/NPR_CN.cpp:408

#3 0x0000000000411793 in cds_static::NPR_CN::find_RMQ (this=0xfc77e0, x=1, y=11581659, csa=0xfe2a60, lcp=0xfc76b0)

at static/suffixtree/NPR_CN.cpp:348

#4 0x0000000000402c39 in cds_static::SuffixTreeY::SDepth (this=0xfc7680, vl=0, vr=11581659) at static/suffixtree/SuffixTreeY.cpp:91
#5 0x0000000000404eba in cds_static::SuffixTreeY::Child (this=0xfc7680, vl=0, vr=11581659, a=99 'c', child_l=0x7fffa7020308,

child_r=0x7fffa7020300) at static/suffixtree/SuffixTreeY.cpp:279

#6 0x00000000004022e9 in testSuffixTree (s1=0xfc7680) at testSuffixTree.cpp:52
#7 0x00000000004024fc in main (argc=2, argv=0x7fffa7020698) at testSuffixTree.cpp:92

Hope this is enough information to fix the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions