Bug 20937 - Detect ODR violations
Summary: Detect ODR violations
Status: NEW
Alias: None
Product: libabigail
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
: P2 enhancement
Target Milestone: ---
Assignee: Dodji Seketeli
URL:
Keywords:
Depends on:
Blocks: 18941
  Show dependency treegraph
 
Reported: 2016-12-06 12:41 UTC by Dodji Seketeli
Modified: 2016-12-06 12:43 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dodji Seketeli 2016-12-06 12:41:07 UTC
It could be possible to make add a --detect-odr-violation option to abidw or to write a new tool named e.g odrcheck that would do that.

The idea is to modify libabigail to add an ODR-checking mode that:

1/ disables type and decl de-duplication

2/ during type canonicalization, disables the ODR-based optimization which enables us to avoid comparing two types of the same kind and same name.  Rather, structurally (memberwise) compare all types during type canonicalization.

3/ wen comparing class types, does not compare their virtual member functions

3/ during type canonicalization, if two types of the same kind have the same name but are structurally different flag them as violating ODR.