Bug 19619 - failing to suppress added aliased function reports for C++
Summary: failing to suppress added aliased function reports for C++
Status: RESOLVED FIXED
Alias: None
Product: libabigail
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Dodji Seketeli
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-12 02:18 UTC by Michi Henning
Modified: 2016-02-13 07:58 UTC (History)
1 user (show)

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


Attachments
Dump files and suppressions file (5.94 MB, application/gzip)
2016-02-12 02:18 UTC, Michi Henning
Details
A version of the committed patch that fixes the issue, but without regression tests (1.69 KB, patch)
2016-02-13 07:58 UTC, Dodji Seketeli
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michi Henning 2016-02-12 02:18:56 UTC
Created attachment 8980 [details]
Dump files and suppressions file

I'm risking making a fool of myself again. Maybe I made a mistake...

I have a suppressions file like so:

[suppress_function]
    name_regexp = boost::.*
    change_kind = added-function

[suppress_function]
    name_regexp = std::.*
    change_kind = added-function

[suppress_function]
    name_regexp = unity::scopes::testing::.*
    change_kind = added-function

Command is:

$ abidiff --no-unreferenced-symbols --suppressions suppressions libunity-scopes_1.0.0.abi.xml libunity-scopes_1.0.3.abi.xml

The suppressions are there to get rid of function template instantiations for things that were added after the baseline ABI.

The suppressions work to a large degree. The boost suppression gets rid of all boost added functions. The std and unity::scopes::testing suppressions match many, but not all, of the functions in their respective namespaces, so the output still shows 33 added functions.

It's not clear to me why.
Comment 1 Dodji Seketeli 2016-02-12 08:29:54 UTC
> I have a suppressions file like so:
>
> [suppress_function]
>     name_regexp = boost::.*
>     change_kind = added-function
>
> [suppress_function]
>     name_regexp = std::.*
>     change_kind = added-function
>
> [suppress_function]
>     name_regexp = unity::scopes::testing::.*
>     change_kind = added-function

[...]

> The std and unity::scopes::testing suppressions match many, but not
> all, of the functions in their respective namespaces, so the output
> still shows 33 added functions.

Before I risk getting some false explanation, could you tell me if the
suppression specificication below works?

 [suppress_function]
     name_regexp = boost::.*
     change_kind = added-function
     allow_other_aliases = false

 [suppress_function]
     name_regexp = std::.*
     change_kind = added-function
     allow_other_aliases = false

 [suppress_function]
     name_regexp = unity::scopes::testing::.*
     change_kind = added-function
     allow_other_aliases = false

(Note the new allow_other_aliases property that got added)

> It's not clear to me why.

Again, we'd have needed more feedback from the tool here :(

But then if the supressions above wortk I think I have an idea of what
the issue is.
Comment 2 Michi Henning 2016-02-12 09:32:49 UTC
I just tried to reproduce, but can't now. (I'm on a different machine, and it's late. I may have made a mistake.)

Do you see the problem I described with the attached files?
Comment 3 Michi Henning 2016-02-12 23:48:46 UTC
After adding allow_other_aliases = false, the additional symbols are suppressed, thanks!

I find this surprising though; if I say "suppress every function and the std:: namespace", that's just what should happen.
Comment 4 Dodji Seketeli 2016-02-13 07:52:16 UTC
This is a bug, indeed.

The change report about the added function should have been suppressed by that suppression specification that you provided.

The use of the undocumented "allow_other_aliases = false" should be considered as a temporary workaround.

The problem should be fixed in the master branch of the git repository by commit https://sourceware.org/git/gitweb.cgi?p=libabigail.git;a=commit;h=1eecd89ee1fca9a5a5c4dc656c88dd9a739c5683.  The commit log of that patch does have an extensive explanation of the underlying problem, in case you are interested.

You should thus, eventually, be able to do away with the use of the undocumented "allow_other_aliases" property.

Sorry for the inconvenience.
Comment 5 Dodji Seketeli 2016-02-13 07:58:22 UTC
Created attachment 8985 [details]
A version of the committed patch that fixes the issue, but without regression tests

I am attaching a version of the committed patch, but without regression testing material.  This makes it easy to back-port the patch, without having to carry binary content (present in the regression testing bits of the committed patch) around.