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

Assertion `ReferencesToBeSet.empty() && "Some objects had a reference that was not created"' failed. #17

Closed
marxin opened this issue Sep 27, 2017 · 1 comment
Labels

Comments

@marxin
Copy link

marxin commented Sep 27, 2017

Using arbitrary GCC 4.8.0+, I can see:

$ cat ipa-icf.ii
template < typename _Tp>
class Trans_NS___cxx11_list
    {
  

typedef _Tp iterator;

typedef _Tp _Node;
  _Node _M_create_node();

public:
  iterator end() ;
  void push_back(_Tp ) { _M_insert(end()); }
  template < typename... _Args > void _M_insert(_Args ... ) {
    _M_create_node();
  }
};
class sem_item_optimizer {
Trans_NS___cxx11_list< int * > worklist;
  void worklist_push();
};
int *worklist_push_cls;
void sem_item_optimizer::worklist_push() {
  worklist.push_back(worklist_push_cls);
}

$ g++ /tmp/ipa-icf.ii -g -c -O2
$ ./bin/diva ipa-icf.o

Warning: Ignoring unrecognised DW_AT, DW_FORM combination 'DW_AT_const_value', 'DW_FORM_block1'.

Warning: Ignoring unknown/unsupported DWARF tag 'DW_TAG_GNU_call_site'.

Warning: Ignoring unknown/unsupported DWARF tag 'DW_TAG_GNU_formal_parameter_pack'.

Warning: Ignoring unknown/unsupported DWARF tag 'DW_TAG_dwarf_procedure'.
diva: /home/marxin/Programming/DIVA/DIVA/ElfDwarfReader/src/ElfDwarfReader.cpp:155: void ElfDwarfReader::DwarfReader::createCompileUnits(const ElfDwarfReader::DwarfDebugData&, LibScopeView::ScopeRoot&): Assertion `ReferencesToBeSet.empty() && "Some objects had a reference that was not created"' failed.
Aborted (core dumped)

Thanks

@SeanEveson SeanEveson added the bug label Sep 27, 2017
@SeanEveson
Copy link
Contributor

Thanks for the bug report.

Repro: repro.zip

FlameTop pushed a commit that referenced this issue Sep 28, 2017
Don't assert all references have been resolved if Dies were skipped, Fixes #17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants