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

Use anonymous namespace to avoid duplicate symbols #11069

Merged
merged 1 commit into from
Sep 4, 2015

Conversation

wmtan
Copy link
Contributor

@wmtan wmtan commented Sep 2, 2015

Bug fix. Totally technical.
In RecoEgamma/EgammaTools/plugins, there are free function templates in different files that have the same signature. These are violations of the ODR (one definition rule).
The reason this problem has not yet been seen before is that the function templates in question are declared "inline". However, "inline" is only a suggestion to the compiler. When compiled in debug mode (-O0), in-lining was apparently turned off. This did not cause a link error, as function templates are not instantiated until run time. However, it caused the wrong function to be called in several cases, causing relvals 4.53, 135.4, and 1330.0 to fail.
The fix is to put the templates inside an anonymous namespace, so each template is not seen outside the compilation unit. This fixes the failing relvals.

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 2, 2015

A new Pull Request was created by @wmtan for CMSSW_7_5_X.

Use anonymous namespace to avoid duplicate symbols

It involves the following packages:

RecoEgamma/EgammaTools

@cmsbuild, @cvuosalo, @slava77 can you please review it and eventually sign? Thanks.
@Sam-Harper, @lgray this is something you requested to watch as well.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
If you are a L2 or a release manager you can ask for tests by saying 'please test' in the first line of a comment.
@Degano you are the release manager for this.
You can merge this pull request by typing 'merge' in the first line of your comment.

@slava77
Copy link
Contributor

slava77 commented Sep 3, 2015

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2015

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2015

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2015

@slava77
Copy link
Contributor

slava77 commented Sep 3, 2015

+1

for #11069 6a16ed7

  • changes are almost as in 76X version
  • jenkins tests pass and comparisons with the baseline show no difference as expected from regular builds

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 3, 2015

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_5_X IBs once checked with relvals in the development release cycle of CMSSW (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar

@davidlange6
Copy link
Contributor

+1

cmsbuild added a commit that referenced this pull request Sep 4, 2015
Use anonymous namespace to avoid duplicate symbols
@cmsbuild cmsbuild merged commit 2908a4e into cms-sw:CMSSW_7_5_X Sep 4, 2015
@wmtan wmtan deleted the UseNamespace75X branch September 14, 2015 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants