Skip to content

Code generation for std cannot be processed by symtab2gb #602

Closed

Description

@adpaco

Because of a CBMC invariant violation:

--- begin invariant violation report ---
Invariant check failed
File: ../src/goto-programs/goto_convert_functions.cpp:170 function: convert_function
Condition: symbol_table.has_symbol(p)
Reason: parameter identifier must be a known symbol
Backtrace:
symtab2gb(print_backtrace(std::ostream&)+0x50) [0x55b60f773b50]
symtab2gb(get_backtrace[abi:cxx11]()+0x169) [0x55b60f7740f9]
symtab2gb(std::enable_if<std::is_base_of<invariant_failedt, invariant_failedt>::value, void>::type invariant_violated_structured<invariant_failedt, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0x48) [0x55b60f75ea18]
symtab2gb(goto_convert_functionst::convert_function(dstringt const&, goto_functiont&)+0x2331) [0x55b60f949e51]
symtab2gb(goto_convert_functionst::goto_convert(goto_functionst&)+0x11c) [0x55b60f94adec]
symtab2gb(goto_convert(symbol_table_baset&, goto_functionst&, message_handlert&)+0x497) [0x55b60f94be37]
symtab2gb(goto_convert(goto_modelt&, message_handlert&)+0x89) [0x55b60f94c049]
symtab2gb(+0xe69c8) [0x55b60f7609c8]
symtab2gb(symtab2gb_parse_optionst::doit()+0x13d) [0x55b60f760fed]
symtab2gb(parse_options_baset::main()+0x8f) [0x55b60f75932f]
symtab2gb(main+0x39) [0x55b60f758b59]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f742fdf20b3]
symtab2gb(_start+0x2e) [0x55b60f75e66e]


--- end invariant violation report ---
Aborted (core dumped)

This is blocking #581

Activity

  1. self-assigned this
    on Oct 29, 2021
  2. adpaco commented on Oct 29, 2021

    @adpaco
    ContributorAuthor

    Modified CBMC source to print out the name of the parameter and got this:

    Invariant check failed
    File: /home/ubuntu/cbmc-cbmc-5.43.0/src/goto-programs/goto_convert_functions.cpp:174 function: convert_function
    Condition: symbol_table.has_symbol(p)
    Reason: parameter identifier must be a known symbol
    function: _ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11split_first17he416d1b2a43c18ccE
    parameter: _ZN4core5slice29_$LT$impl$u20$$u5b$T$u5d$$GT$11split_first17he416d1b2a43c18ccE::1::var_1::self
    
  3. adpaco commented on Nov 1, 2021

    @adpaco
    ContributorAuthor

    Found that core::slice::<impl [T]>::split_first is one of the functions that we are skipping in should_skip_current_fn. It is linked to #207 but since then ProjectionElem::Subslice has been partially implemented.

    It is quite likely that, even if this works, it will be blocked by the other functions in should_skip_current_fn.

  4. adpaco commented on Nov 4, 2021

    @adpaco
    ContributorAuthor

    After #609 std can be processed using symtab2gb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[F] Crash

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions