@@ -91,7 +91,26 @@
[suppress_type]
soname_regexp = libwebkit2?gtk-.*\\.so.*
- name_regexp = (^std::.*|WebCore::.*|WebKit::.*)
+ name_regexp = ^std::.*
+ drop = true
+
+[suppress_type]
+# Transform all C++ types in the WebCore and WebKit namespaces into
+# opaque types. These are essentially internal types of libwebkit2
+# anyway. This greatly reduces the size of the in-memory working set.
+ label = libabigail::OPAQUE_TYPE_LABEL
+ soname_regexp = libwebkit2?gtk-.*\\.so.*
+ name_regexp = (^WebCore::.*|^WebKit::.*)
+ drop = true
+
+[suppress_type]
+# All structs that don't start with either WebKit* or _WebKit are
+# considered internal types and so are transform into opaque types.
+# This helps to reduce the size of the in-memory working set further.
+ label = libabigail::OPAQUE_TYPE_LABEL
+ soname_regexp = libwebkit2?gtk-.*\\.so.*
+ type_kind = struct
+ name_not_regexp = ^_?WebKit.*
drop = true
#######################################################
@@ -242,7 +242,8 @@ The potential properties of this sections are listed below:
Define a label for the section. A label is just an informative
string that might be used by the tool to refer to a type suppression
- in error messages.
+ in error messages. There can also be some special label names that
+ make the suppression system behave a certain way.
* ``soname_regexp``
@@ -390,8 +391,17 @@ The potential properties of this sections are listed below:
ABI being analyzed. This property makes its enclosing suppression
specification to be applied in the :ref:`early suppression
specification mode <early_suppression_mode_label>`. The net effect
- is that it potentially reduces the memory used to represent the ABI
- being analyzed.
+ is that it potentially reduces the amount of memory used to represent
+ the ABI being analyzed.
+
+ Please note that for ``struct``, ``class`` or``enum`` types matching
+ a suppression specification with this property having a value set to
+ "yes" (or to "true"), if the specification also has a ``label``
+ property with a value set to ``libabigail::OPAQUE_TYPE_LABEL``, then
+ the type is transformed into an opaque type, rather than being just
+ dropped on the floor. That also reduces the amount of memory used to
+ represent the ABI being analyzed, but with potentially less
+ disruption in the resulting ABI representation.
Please note that for this property to be effective, the enclosing
suppression specification must have at least one of the following
@@ -665,10 +675,22 @@ changes, unless the ``has_size_changes`` property is set to ``yes``.
``label`` ``=`` <some-value>
- Define a label for the section. A label is just an informative
- string that might be used by a tool to refer to a type suppression in
- error messages.
-
+ Define a label for the section. In general, a label is just an
+ informative string that might be used by a tool to refer to a type
+ suppression in error messages.
+
+ Note however that there are some special label values that can
+ trigger a special kind of behavior. Below are those special label
+ values:
+
+ * ``libabigail::OPAQUE_TYPE_LABEL``: A struct, class or enum type
+ that matches a ``[suppress_type]`` section with this label
+ property value is going to be replaced by an opaque type of the
+ same kind. Note that an opaque type is essentially a
+ declaration-only type, thus with no member. Also note that for a
+ ``[suppress_type]`` section with this label to trigger the
+ transformation of a type into an opaque type, the section must
+ have the ``drop`` property value set to ``yes|true``.
* ``name``
@@ -949,13 +949,13 @@ suppression_matches_soname_or_filename(const string& soname,
const suppression_base& suppr);
const char*
-get_private_types_suppr_spec_label();
+get_opaque_types_suppr_spec_label();
bool
-is_private_type_suppr_spec(const type_suppression&);
+is_opaque_type_suppr_spec(const type_suppression&);
bool
-is_private_type_suppr_spec(const suppression_sptr& s);
+is_opaque_type_suppr_spec(const suppression_sptr& s);
bool
suppression_can_match(const fe_iface&,
@@ -2620,7 +2620,7 @@ diff::is_suppressed(bool &is_private_type) const
if (d->suppresses_diff(this))
{
do_suppress = true;
- if (is_private_type_suppr_spec(d))
+ if (is_opaque_type_suppr_spec(d))
is_private_type = true;
break;
}
@@ -15259,9 +15259,9 @@ variable_is_suppressed(const reader& rdr,
///
/// @param type_die the DIE that designates the type to consider.
///
-/// @param type_is_private out parameter. If this function returns
+/// @param type_is_opaque out parameter. If this function returns
/// true (the type @p type_die is suppressed) and if the type was
-/// suppressed because it's private then this parameter is set to
+/// suppressed because it's opaque then this parameter is set to
/// true.
///
/// @return true iff the type designated by the DIE @p type_die, in
@@ -15271,7 +15271,7 @@ static bool
type_is_suppressed(const reader& rdr,
const scope_decl* scope,
Dwarf_Die *type_die,
- bool &type_is_private)
+ bool &type_is_opaque)
{
if (type_die == 0
|| (dwarf_tag(type_die) != DW_TAG_enumeration_type
@@ -15288,7 +15288,7 @@ type_is_suppressed(const reader& rdr,
return suppr::is_type_suppressed(rdr,
qualified_name,
type_location,
- type_is_private,
+ type_is_opaque,
/*require_drop_property=*/true);
}
@@ -15310,8 +15310,8 @@ type_is_suppressed(const reader& rdr,
const scope_decl* scope,
Dwarf_Die *type_die)
{
- bool type_is_private = false;
- return type_is_suppressed(rdr, scope, type_die, type_is_private);
+ bool type_is_opaque = false;
+ return type_is_suppressed(rdr, scope, type_die, type_is_opaque);
}
/// Get the opaque version of a type that was suppressed because it's
@@ -15355,8 +15355,6 @@ get_opaque_version_of_type(reader &rdr,
string type_name, linkage_name;
location type_location;
die_loc_and_name(rdr, type_die, type_location, type_name, linkage_name);
- if (!type_location)
- return result;
string qualified_name = build_qualified_name(scope, type_name);
@@ -15874,10 +15872,10 @@ build_ir_node_from_die(reader& rdr,
case DW_TAG_enumeration_type:
{
- bool type_is_private = false;
+ bool type_is_opaque = false;
bool type_suppressed =
- type_is_suppressed(rdr, scope, die, type_is_private);
- if (type_suppressed && type_is_private)
+ type_is_suppressed(rdr, scope, die, type_is_opaque);
+ if (type_suppressed && type_is_opaque)
{
// The type is suppressed because it's private. If other
// non-suppressed and declaration-only instances of this
@@ -15906,11 +15904,11 @@ build_ir_node_from_die(reader& rdr,
case DW_TAG_class_type:
case DW_TAG_structure_type:
{
- bool type_is_private = false;
+ bool type_is_opaque = false;
bool type_suppressed=
- type_is_suppressed(rdr, scope, die, type_is_private);
+ type_is_suppressed(rdr, scope, die, type_is_opaque);
- if (type_suppressed && type_is_private)
+ if (type_suppressed && type_is_opaque)
{
// The type is suppressed because it's private. If other
// non-suppressed and declaration-only instances of this
@@ -926,7 +926,7 @@ type_suppression::suppresses_diff(const diff* diff) const
// public -- depending on, e.g, if the typedef is defined in a
// public header or not. So if we are in the context of a
// private type suppression let's *NOT* peel typedefs away.
- if (!is_private_type_suppr_spec(*this))
+ if (!is_opaque_type_suppr_spec(*this))
{
ft = peel_typedef_type(ft);
st = peel_typedef_type(st);
@@ -1346,7 +1346,7 @@ suppression_matches_type_location(const type_suppression& s,
// the declaration. If we reach this place, it
// means the class has no definition at this point.
ABG_ASSERT(!cl->get_definition_of_declaration());
- if (s.get_label() == get_private_types_suppr_spec_label())
+ if (s.get_label() == get_opaque_types_suppr_spec_label())
// So this looks like what really amounts to an
// opaque type. So it's not defined in the public
// headers. So we want to filter it out.
@@ -4910,12 +4910,12 @@ suppression_matches_soname_or_filename(const string& soname,
/// specification that is auto-generated by libabigail to suppress
/// change reports about types that are not defined in public headers.
const char*
-get_private_types_suppr_spec_label()
+get_opaque_types_suppr_spec_label()
{
- static const char *PRIVATE_TYPES_SUPPR_SPEC_NAME =
- "Artificial private types suppression specification";
+ static const char *OPAQUE_TYPES_SUPPR_SPEC_NAME =
+ "libabigail::OPAQUE_TYPE_LABEL";
- return PRIVATE_TYPES_SUPPR_SPEC_NAME;
+ return OPAQUE_TYPES_SUPPR_SPEC_NAME;
}
/// Test if a type suppression specification represents a private type
@@ -4926,8 +4926,8 @@ get_private_types_suppr_spec_label()
///
/// @return true iff @p s is a private type suppr spec.
bool
-is_private_type_suppr_spec(const type_suppression& s)
-{return s.get_label() == get_private_types_suppr_spec_label();}
+is_opaque_type_suppr_spec(const type_suppression& s)
+{return s.get_label() == get_opaque_types_suppr_spec_label();}
/// Test if a type suppression specification represents a private type
/// suppression automatically generated by libabigail from the user
@@ -4937,11 +4937,11 @@ is_private_type_suppr_spec(const type_suppression& s)
///
/// @return true iff @p s is a private type suppr spec.
bool
-is_private_type_suppr_spec(const suppression_sptr& s)
+is_opaque_type_suppr_spec(const suppression_sptr& s)
{
type_suppression_sptr type_suppr = is_type_suppression(s);
return (type_suppr
- && type_suppr->get_label() == get_private_types_suppr_spec_label());
+ && type_suppr->get_label() == get_opaque_types_suppr_spec_label());
}
// </file_suppression stuff>
@@ -5275,9 +5275,9 @@ is_variable_suppressed(const fe_iface& fe,
///
/// @param type_location the source location of the type.
///
-/// @param type_is_private output parameter. This is set to true if
+/// @param type_is_opaque output parameter. This is set to true if
/// the type was matched by one suppression specification, and if the
-/// suppression was for private types.
+/// suppression was for opaque types.
///
/// @param require_drop_property if true, this type requires the
/// suppression specification to contain the "drop" property to match
@@ -5289,7 +5289,7 @@ bool
is_type_suppressed(const fe_iface& fe,
const string& type_name,
const location& type_location,
- bool& type_is_private,
+ bool& type_is_opaque,
bool require_drop_property)
{
for (auto i : fe.suppressions())
@@ -5301,14 +5301,14 @@ is_type_suppressed(const fe_iface& fe,
type_name,
type_location))
{
- if (is_private_type_suppr_spec(*suppr))
- type_is_private = true;
+ if (is_opaque_type_suppr_spec(*suppr))
+ type_is_opaque = true;
return true;
}
}
- type_is_private = false;
+ type_is_opaque = false;
return false;
}
@@ -2003,7 +2003,7 @@ handle_file_entry(const string& file_path,
{
if (!suppr)
{
- suppr.reset(new type_suppression(get_private_types_suppr_spec_label(),
+ suppr.reset(new type_suppression(get_opaque_types_suppr_spec_label(),
/*type_name_regexp=*/"",
/*type_name=*/""));
@@ -2033,6 +2033,15 @@ test-diff-suppr/test-has-data-member-inserted-at-3-v0.c \
test-diff-suppr/test-has-data-member-inserted-at-3-v0.o \
test-diff-suppr/test-has-data-member-inserted-at-3-v1.c \
test-diff-suppr/test-has-data-member-inserted-at-3-v1.o \
+test-diff-suppr/PR31646/test-PR31646.2.abignore \
+test-diff-suppr/PR31646/test-PR31646.abignore \
+test-diff-suppr/PR31646/test-PR31646-result-1.txt \
+test-diff-suppr/PR31646/test-PR31646-result-2.txt \
+test-diff-suppr/PR31646/test-PR31646-result-3.txt \
+test-diff-suppr/PR31646/test-PR31646-v0.cc \
+test-diff-suppr/PR31646/test-PR31646-v0.o \
+test-diff-suppr/PR31646/test-PR31646-v1.cc \
+test-diff-suppr/PR31646/test-PR31646-v1.o \
\
test-lookup-syms/test0.cc \
test-lookup-syms/test0.o \
new file mode 100644
@@ -0,0 +1,21 @@
+Functions changes summary: 0 Removed, 1 Changed, 0 Added function
+Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
+
+1 function with some indirect sub-type change:
+
+ [C] 'function opaque* fun(type&)' at test-PR31646-v0.cc:15:1 has some indirect sub-type changes:
+ return type changed:
+ entity changed from 'opaque*' to 'void'
+ type size changed from 64 to 0 (in bits)
+ parameter 1 of type 'type&' has sub-type changes:
+ in referenced type 'struct type' at test-PR31646-v1.cc:8:1:
+ type size hasn't changed
+ 1 data member change:
+ type of 'opaque* m1' changed:
+ in pointed to type 'struct opaque' at test-PR31646-v1.cc:1:1:
+ type size changed from 64 to 96 (in bits)
+ 1 data member insertion:
+ 'char m_inserted', at offset 32 (in bits) at test-PR31646-v1.cc:4:1
+ 1 data member change:
+ 'int m1' offset changed from 32 to 64 (in bits) (by +32 bits)
+
new file mode 100644
new file mode 100644
@@ -0,0 +1,10 @@
+Functions changes summary: 0 Removed, 1 Changed, 0 Added function
+Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
+
+1 function with some indirect sub-type change:
+
+ [C] 'function opaque* fun(type&)' at test-PR31646-v0.cc:15:1 has some indirect sub-type changes:
+ return type changed:
+ entity changed from 'opaque*' to 'void'
+ type size changed from 64 to 0 (in bits)
+
new file mode 100644
@@ -0,0 +1,17 @@
+struct opaque
+{
+ int m0;
+ int m1;
+};
+
+struct type
+{
+ int m0;
+ opaque* m1;
+ int m2;
+};
+
+opaque*
+fun(type&)
+{
+}
new file mode 100644
GIT binary patch
literal 3200
zcmb_e&1+*-6hAjFY0`PqByB`HR%jxM^I={-T089w9V5k=76&PXK@o@elDsBQn-7!M
z(y5Aqq6}_EaV0KX2;xp~F(@tsH*Wkh-0Mzoq367JPIB{jMNtpro^yWpeBFEQy)SP+
zd-HlsDG*X{4JMkP0PiFxa?KZO@BrlC*7n_Bw(q|6`@P#gevfbhRElN|8VWS%WNJ!`
z<doXQQFY5;BuPTC0&!oALp+{vdmi|Pi^=!caCTyN#w0MMx>YcJGz*E8h0x6YVGmTs
zUk8~8Nq+U&w+JO^h<((7RO$t?P;+3Ut`yW&bHm)pt)p=)r;M~|23R4ba=5U0^>{jG
z8p}(|^J*cPeFz}_7?|cY)4+u%GAQn#*^H&0K8Mjv3f4>S<jA<Tcyf+nBonZci!Ea5
zSvH3!sT3*#{O$848l>Vez`{221lnFiu9W&CJx7cdj6W2X{k6x`ax4>s_5BhGX2+_L
zQSZhKH1_Tc9Ow`1*AE@I@%*j))}>38%lS&hTD2<qYPq^nUMoM9KfmX+^4qq@6UFL<
ze6i~t_MFYO({qMy6IFZI>}(#duNBu;i$~Rbu?_W?R<IX)t9}m88F|Isy_L$^>RR!r
zY&Dxu>h!x#snu`2>XzEBS2}PTcEfGk?m=nTX`EE6msi#|Dkbt9m0GrE`(m->?(Y{z
zhl9be#PR;eND*a5KyYJg>q`DSZrFu?uvd6j0#YY?ppLU@>1;A}51aG|!t^8ZoBd2W
z`+jU|Zss}~1aRa?{f)zKe@0DWQ=?$Kl;h@4%^SgWox(^lFhdj>FcSr%z4l0G76!~}
z+C(%?Io<}Gofv770clN}hz4XPiY6H_r)hymeOS=;XMDjTT0C`lIg<3`4C?wWNG8H*
zwX%W*_9L8rLJzVaI6ezLJ<OassCVlk<76*25LD7|%9~*Q#SqRad>q1GX8lv<;k>d&
z$}6$SG<%Buqm0YCZnI7g9FgE(1}apT3;rGJSDA<F$umxSqwfz`qdQ&CZXoxD0q=<9
zImaGY^m>5R7>&RhItRAZavF#2y4&0D<D4(sjmFS9nwqwUcCYPByBxSZM_e$4hy>St
zz1i<}9sF`xy}svI_(Bv%p51(n13R7i{?P6^ypaFMme8N}Nctq<YAlS;H|u1pQvnsi
z{13J^@th{>V%Yx)oTT&kZ~dwN;h2<9^8Y}JMqyhzSM*BNG#e7jd{}>Fd>%R3$=$)P
zuTPsehGWu%$>5v5)no|U`u|@h(_`raHY|^kKnVNOI-}~(b3?_S>ZjK=Tz?C(a7={Y
zK7%(&(I{+N$GNEdyPW?O_NDyvzJ&7+5Tlq<CyG89d^ueKm`i@)Zy+A!f584f|Be5L
zr}%I1ft2@A!bo1>pRm8o3-5#vG*5`1*nNcpVN-7r>f*mHhRkLE1pWersQv$%_g~H_
z?LU3x#9#2J+!XtBuD`<t(|3rzo?(CLY1C3ve18f!uM>wGLsVCk|4&^1H)G2{2>bs9
D{7v`h
literal 0
HcmV?d00001
@@ -0,0 +1,18 @@
+struct opaque
+{
+ int m0;
+ char m_inserted;
+ int m1;
+};
+
+struct type
+{
+ int m0;
+ opaque* m1;
+ int m2;
+};
+
+void
+fun(type&)
+{
+}
new file mode 100644
GIT binary patch
literal 3312
zcmcIm&1)n@6n{0H$#gQwWRelh8X+B7akFdpd?aSGS+YjL?oM=(C9oG^8GB}WKHT}T
zrza#4@gN9`mk1&rJc+CyH}U34@FXbsC+NYu-UJW&Ud^kSp0XE3v0&=G_j@1p>b<J!
zdGq?M8!;h34FT6+EGZP=m&BOglk6Tm0vWhdy#I6Y{u{rY-Tme}gySGg(i$|a(G(uZ
zkPst&PTa*=v~yr2h=VDb#FSYjUbOQNm$(V>sd%#!z_geq3+cRUen7_PJUetI`(%<p
zQ?v^(C($${OoyP_paUX3u{V{E`0!h_n4u~5ZUbh`d&q&92gBT16IYX0k_VY>G>&D2
zkxC|q*qSLaxY0%NR4S7+R##RR#Zn^u80L+Bsh#B5Eq)%;x|TGsGSkea01^v`9$*O5
z5zn2&m83@}MPc@qPtQ^GnK&F|V#@%tX*PyuC`n2WWT7QTliJG&V5W#Pj<y$(3L$<^
z%@d(A;18KqS&^7njV%nrO24>(nUQFu#al50joYPWr|<cJSB2oD=RvpUzBcfn^zsH4
z_i$5Um4@rX&6n<2`<E`|FI)M%v+3lmLawlp+sZv_T{!frR?!VuVHegdyB!QV-frFN
zcz&~jqU%>0yT{vG_SU9-RIuziWE<VKm#ucIuQs#wW{_<)%Wk<@cbl!O-zc9J3YRyw
zujI3V*AM#HsvEeHwX4lq&F&9+JwJQ<a3jC9xdmimvtS?Pol52Z4IZ%`+}z*au`XbZ
z*8f3yWIF)w+Hi=|LlDPlu`-u1&#-k*AWT0R@(4ViO1~Z3pP#;g217V<rmj!HuYW`-
zvDHy9Uh2`2n9v);>pp>zU<|Kw1THUe1Ri>1LRtf6LeiKu9&+dnm>U~~I0Nw7MGONL
zB2dbI{x3N7VJTFf(Y1?c^u)d3NUA5ZD2J<{RwA5syUzAYObMso3oJjX;Vi=A%uolz
z-MSdES2+-r4dJwIn&s;n&LY$`{5;Do4Oew}pyBvF%JDf<Jx^5=+H0I`h^V}D`zP6k
z?CB@JB1q|(q@nOnh9cydD*P*!uQJu+TZ~gJ!}SEGf6@-zGSa{w(uU#!?>GR5o*{6`
z{XRIp*K(bzS02>y0j+gWCwaGA_PwJCwd=c`x;N?4YIZ#3f=eit;F6Rp-FDl<kE7G+
z2A+fOiro*~$~_M3HA*$#ZF{_t|43HQpK7G~q{8hnqx!CJvJH<l6bO@l5JHL<LwuOk
z{hvl9o!@`!PyN?p(t2wBA4mud-ImT3{Ylvi*$~^~!)md^B4T8x?izl><=Dkpk4cIZ
z2H%%f<4L!@jVc`@>n|A0ja?<D+tNOx@;~E-Du2qKUSmD~Dq?y}gy1IzZ;=ohx@`${
zQR{!r>%YRjv_8E@`uaV@D5lC2SvhRJoF@uks@7NZb;P6mAF%)Tf8+noL;U-EAk}-S
z!l-o>eUJT>UeS;A1I-HMr|dpMhOmjZ2<1=Ne_I(cRrOQw$H+w0-=b#YQ0J8DPhUml
yukfg~$?r#AzrhL9cZ<HZx<B<aYO6)QKWnHD4-PkiD6c60ZO;G8k>!xl{r?2*(*unF
literal 0
HcmV?d00001
@@ -0,0 +1,4 @@
+[suppress_type]
+ label = libabigail::OPAQUE_TYPE_LABEL
+ name = opaque
+ drop = yes
\ No newline at end of file
new file mode 100644
@@ -0,0 +1,3 @@
+[suppress_type]
+ name = opaque
+ drop = yes
\ No newline at end of file
@@ -2396,6 +2396,36 @@ InOutSpec in_out_specs[] =
"data/test-diff-suppr/test-has-strict-flexible-array-data-member-conversion-report-2.txt",
"output/test-diff-suppr/test-has-strict-flexible-array-data-member-conversion-report-2.txt",
},
+ {
+ "data/test-diff-suppr/PR31646/test-PR31646-v0.o",
+ "data/test-diff-suppr/PR31646/test-PR31646-v1.o",
+ "",
+ "",
+ "",
+ "--no-default-suppression ",
+ "data/test-diff-suppr/PR31646/test-PR31646-result-1.txt",
+ "output/test-diff-suppr/PR31646/test-PR31646-result-1.txt",
+ },
+ {
+ "data/test-diff-suppr/PR31646/test-PR31646-v0.o",
+ "data/test-diff-suppr/PR31646/test-PR31646-v1.o",
+ "",
+ "",
+ "data/test-diff-suppr/PR31646/test-PR31646.abignore",
+ "--no-default-suppression ",
+ "data/test-diff-suppr/PR31646/test-PR31646-result-2.txt",
+ "output/test-diff-suppr/PR31646/test-PR31646-result-2.txt",
+ },
+ {
+ "data/test-diff-suppr/PR31646/test-PR31646-v0.o",
+ "data/test-diff-suppr/PR31646/test-PR31646-v1.o",
+ "",
+ "",
+ "data/test-diff-suppr/PR31646/test-PR31646.2.abignore",
+ "--no-default-suppression ",
+ "data/test-diff-suppr/PR31646/test-PR31646-result-3.txt",
+ "output/test-diff-suppr/PR31646/test-PR31646-result-3.txt",
+ },
// This should be the last entry
{NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
};
@@ -1483,7 +1483,7 @@ compare(const elf_file& elf1,
opts.show_all_types);
ABG_ASSERT(reader);
- reader->add_suppressions(priv_types_supprs1);
+ reader->add_suppressions(supprs);
set_generic_options(*reader, opts);
corpus1 = reader->read_corpus(c1_status);
@@ -1664,6 +1664,9 @@ compare(const elf_file& elf1,
///
/// @param debug_dir the debug directory of the ELF file.
///
+/// @param priv_types_supprs type suppression specification that
+/// suppress private types.
+///
/// @param opts the options passed the user.
///
/// @param env the environment to use for the comparison.
@@ -1681,6 +1684,7 @@ compare(const elf_file& elf1,
static abidiff_status
compare_to_self(const elf_file& elf,
const string& debug_dir,
+ const suppressions_type& priv_types_supprs,
const options& opts,
abigail::ir::environment& env,
corpus_diff_sptr& diff,
@@ -1707,6 +1711,14 @@ compare_to_self(const elf_file& elf,
<< elf.path
<< " ...\n";
+ ctxt.reset(new diff_context);
+ set_diff_context_from_opts(ctxt, opts);
+ suppressions_type& supprs = ctxt->suppressions();
+
+ // Add the opaque type suppressions set to the set of suppressions.
+ for (auto& suppr : priv_types_supprs)
+ supprs.push_back(suppr);
+
corpus_sptr corp;
abigail::elf_based_reader_sptr reader;
{
@@ -1726,6 +1738,7 @@ compare_to_self(const elf_file& elf,
opts.show_all_types);
ABG_ASSERT(reader);
+ reader->add_suppressions(supprs);
corp = reader->read_corpus(c_status);
if (!(c_status & abigail::fe_iface::STATUS_OK))
@@ -2291,6 +2304,7 @@ public:
abigail::fe_iface::STATUS_UNKNOWN;
status |= compare_to_self(args->elf1, args->debug_dir1,
+ args->private_types_suppr1,
args->opts, env, diff, ctxt, out,
&detailed_status);
@@ -2915,7 +2929,7 @@ compare_prepared_userspace_packages(package& first_package,
if (iter != second_package.path_elf_file_sptr_map().end()
&& (iter->second->type == abigail::elf::ELF_TYPE_DSO
|| iter->second->type == abigail::elf::ELF_TYPE_EXEC
- || iter->second->type == abigail::elf::ELF_TYPE_PI_EXEC
+ || iter->second->type == abigail::elf::ELF_TYPE_PI_EXEC
|| iter->second->type == abigail::elf::ELF_TYPE_RELOCATABLE))
{
if (iter->second->type != abigail::elf::ELF_TYPE_RELOCATABLE)
@@ -3069,7 +3083,6 @@ self_compare_prepared_userspace_package(package& pkg,
pkg.debug_info_packages().front()->extracted_dir_path() +
relative_debug_path;
- suppressions_type supprs;
for (map<string, elf_file_sptr>::iterator it =
pkg.path_elf_file_sptr_map().begin();
it != pkg.path_elf_file_sptr_map().end();
@@ -3078,7 +3091,7 @@ self_compare_prepared_userspace_package(package& pkg,
if (it != pkg.path_elf_file_sptr_map().end()
&& (it->second->type == abigail::elf::ELF_TYPE_DSO
|| it->second->type == abigail::elf::ELF_TYPE_EXEC
- || it->second->type == abigail::elf::ELF_TYPE_PI_EXEC
+ || it->second->type == abigail::elf::ELF_TYPE_PI_EXEC
|| it->second->type == abigail::elf::ELF_TYPE_RELOCATABLE))
{
if (it->second->type != abigail::elf::ELF_TYPE_RELOCATABLE)
@@ -3086,10 +3099,12 @@ self_compare_prepared_userspace_package(package& pkg,
compare_args_sptr args
(new compare_args(*it->second,
debug_dir,
- supprs,
+ create_private_types_suppressions
+ (pkg, opts),
*it->second,
debug_dir,
- supprs,
+ create_private_types_suppressions
+ (pkg, opts),
opts));
self_compare_task_sptr t(new self_compare_task(args));
self_compare_tasks.push_back(t);
@@ -1155,7 +1155,9 @@ def abipkgdiff(cmp_half1, cmp_half2):
abipkgdiff_tool,
'--dso-only' if global_config.dso_only else '',
'--self-check',
+ suppressions,
debuginfo_pkg1,
+ devel_pkg1,
cmp_half1.subject.downloaded_file,
]
else: