https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91774

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I am seeing

...
Input String and Parsed String is output inside []

>((dvo) wji (qbr) (ndo) qbr (kfh) (dvp) pzo (oos) (rmy) xuk xug fiv cks wjj zhn 
>(wjh) uwa lql kfe (ckk) lqm ckp ooq uwc pzt xul xun fis qbz ) exit
Input String:  [((dvo) wji (qbr) (ndo) qbr (kfh) (dvp) pzo (oos) (rmy) xuk xug
fiv cks wjj zhn (wjh) uwa lql kfe (ckk) lqm ckp ooq uwc pzt xul xun fis qbz )
exit]
Parsed String: [((dvo) wji (qbr) (ndo) qbr (kfh) (dvp) pzo (oos) (rmy) xuk xug
fiv cks wjj zhn (wjh) uwa lql kfe (lqm ckp ooq uwc pzt xul xun fis qbz) lqm ckp
ooq uwc pzt xul xun fis qbz)]
]Free List root: 40
...
  -49 |    qbz |      0
Hash table Full View END

Parsed String: [((dvo) wji (qbr) (ndo) qbr (kfh) (dvp) pzo (oos) (rmy) xuk xug
fiv cks wjj zhn (wjh) uwa lql kfe (lqm ckp ooq uwc pzt xul xun fis qbz) lqm ckp
ooq uwc pzt xul xun fis qbz)]

terminate called after throwing an instance of 'char const*'

Program received signal SIGABRT, Aborted.

with a backtrace like

#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007ffff717a741 in __GI_abort () at abort.c:79
#2  0x00007ffff7ae0e83 in ?? () from /usr/lib64/libstdc++.so.6
#3  0x00007ffff7ae6dd8 in ?? () from /usr/lib64/libstdc++.so.6
#4  0x00007ffff7ae6e23 in std::terminate() () from /usr/lib64/libstdc++.so.6
#5  0x00007ffff7ae7053 in __cxa_throw () from /usr/lib64/libstdc++.so.6
#6  0x0000000000401dbe in ListPocket::operator[] (this=0x7fffffffdc28, 
    index=29) at ../src/./ListPocketLKR.hpp:87
#7  0x0000000000402844 in Interpreter::Restore (this=0x7fffffffdc10, root=29)
    at ../src/./InterpreterLKR.hpp:167
#8  0x00000000004032b4 in run_Interpreter () at ../src/main.cpp:39
#9  0x000000000040312d in main () at ../src/main.cpp:18

pointing to

ListElement & ListPocket::operator[](const size_t index){
 if(index>= Table.getSize() ) throw "ListPocket operator [] : Array Index Out
of Bounds";
 if( !Table[index].occupied ) throw "ListPocket operator [] : Reference to
Unallocated Element";

 return Table[index].elem;
}

is that the "bug" you see?  Compiling with clang++ doesn't abort.

The code seems ubsan and valgrind clean (whatever that means).

Reply via email to