Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault parsege_calc after build on Ubuntu 18.04 64bits #2

Open
mingodad opened this issue Jul 26, 2023 · 1 comment
Open

Segfault parsege_calc after build on Ubuntu 18.04 64bits #2

mingodad opened this issue Jul 26, 2023 · 1 comment

Comments

@mingodad
Copy link

After clone and build this project on Ubuntu 18.04 64bits with g++-9 and clang-16 and trying to execute parsegen_calc I'm getting a segfault:

./parsegen-calc
parsegen-calc: parsegen-cpp/src/parsegen_shift_reduce_tables.cpp:28: void parsegen::add_terminal_action(parsegen::shift_reduce_tables&, int, int, parsegen::action): Assertion `at(p.terminal_table, state, terminal).kind == action::kind::none' failed.
Aborted (core dumped)

with valgrind:

valgrind ./parsegen-calc
==18910== Memcheck, a memory error detector
==18910== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==18910== Using Valgrind-3.21.0 and LibVEX; rerun with -h for copyright info
==18910== Command: ./parsegen-calc
==18910== 
parsegen-calc: /home/mingo/dev/c/A_grammars/parsegen-cpp/src/parsegen_shift_reduce_tables.cpp:28: void parsegen::add_terminal_action(parsegen::shift_reduce_tables&, int, int, parsegen::action): Assertion `at(p.terminal_table, state, terminal).kind == action::kind::none' failed.
==18910== 
==18910== Process terminating with default action of signal 6 (SIGABRT)
==18910==    at 0x58A2E87: raise (raise.c:51)
==18910==    by 0x58A47F0: abort (abort.c:79)
==18910==    by 0x58943F9: __assert_fail_base (assert.c:92)
==18910==    by 0x5894471: __assert_fail (assert.c:101)
==18910==    by 0x1674F1: parsegen::add_terminal_action(parsegen::shift_reduce_tables&, int, int, parsegen::action) (in /home/mingo/dev/c/A_grammars/parsegen-cpp/build/src/parsegen-calc)
==18910==    by 0x14B3EA: parsegen::accept_parser(parsegen::parser_in_progress const&) (in /home/mingo/dev/c/A_grammars/parsegen-cpp/build/src/parsegen-calc)
==18910==    by 0x16370D: parsegen::build_parser_tables(parsegen::language const&) (in /home/mingo/dev/c/A_grammars/parsegen-cpp/build/src/parsegen-calc)
==18910==    by 0x11CF8E: parsegen::math_lang::ask_parser_tables() (in /home/mingo/dev/c/A_grammars/parsegen-cpp/build/src/parsegen-calc)
==18910==    by 0x10DD91: (anonymous namespace)::calculator::calculator() (in /home/mingo/dev/c/A_grammars/parsegen-cpp/build/src/parsegen-calc)
==18910==    by 0x10FA02: main (in /home/mingo/dev/c/A_grammars/parsegen-cpp/build/src/parsegen-calc)
==18910== 
==18910== HEAP SUMMARY:
==18910==     in use at exit: 204,756 bytes in 1,255 blocks
==18910==   total heap usage: 29,721 allocs, 28,466 frees, 3,657,905 bytes allocated
==18910== 
==18910== LEAK SUMMARY:
==18910==    definitely lost: 0 bytes in 0 blocks
==18910==    indirectly lost: 0 bytes in 0 blocks
==18910==      possibly lost: 0 bytes in 0 blocks
==18910==    still reachable: 204,756 bytes in 1,255 blocks
==18910==         suppressed: 0 bytes in 0 blocks
==18910== Rerun with --leak-check=full to see details of leaked memory
==18910== 
==18910== For lists of detected and suppressed errors, rerun with: -s
==18910== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Aborted (core dumped)
@mingodad
Copy link
Author

After clone and build https://github.com/joshia5/omega_h

./osh_calc
1*3
terminate called after throwing an instance of 'Omega_h::ParserFail'
  what():  error: Parser failure at line 1 column 6 of 1*3
input
    ^

variable input not defined!
Aborted (core dumped)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant