Bug 2336618

Summary: dyninst failed to build with GCC 15 ("error: call of overloaded ‘makeRegisterExpression(Dyninst::MachRegister)’ is ambiguous")
Product: [Fedora] Fedora Reporter: Dave Malcolm <dmalcolm>
Component: dyninstAssignee: William Cohen <wcohen>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: fche, lberk, mcermak, mpolacek, orion, ppalka, wcohen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: dyninst-13.0.0-4.fc42 dyninst-13.0.0-5.fc43 dyninst-13.0.0-5.fc42 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-06 17:37:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2333037    

Description Dave Malcolm 2025-01-09 17:17:03 UTC
I'm experimentally rebuilding rawhide with the not-yet-released GCC 15 to see if anything breaks, and to help write the porting guide.  See https://fedoraproject.org/wiki/User:Dmalcolm/gcc-15

My test build with GCC 15 failed:
https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-15-smoketest-3.failed/build/8476284/

whereas my test build with GCC 14 succeeded:
https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-15-smoketest-3.failed.checker/builds/

Looking at the failure logs e.g.
https://download.copr.fedorainfracloud.org/results/dmalcolm/gcc-15-smoketest-3.failed/fedora-rawhide-x86_64/08476284-dyninst/builder-live.log.gz

I see:
 /builddir/build/BUILD/dyninst-12.3.0-build/dyninst-12.3.0/dyninst-12.3.0/instructionAPI/src/AMDGPU/gfx908/InstructionDecoder-amdgpu-gfx908.C: In member function ‘Dyninst::InstructionAPI::Expression::Ptr Dyninst::InstructionAPI::InstructionDecoder_amdgpu_gfx908::makePCExpr()’:
/builddir/build/BUILD/dyninst-12.3.0-build/dyninst-12.3.0/dyninst-12.3.0/instructionAPI/src/AMDGPU/gfx908/InstructionDecoder-amdgpu-gfx908.C:89:54: error: call of overloaded ‘makeRegisterExpression(Dyninst::MachRegister&)’ is ambiguous
   89 |                         return makeRegisterExpression(baseReg);
      |                                ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~

In file included from /builddir/build/BUILD/dyninst-12.3.0-build/dyninst-12.3.0/dyninst-12.3.0/instructionAPI/src/AMDGPU/gfx908/InstructionDecoder-amdgpu-gfx908.h:31,
                 from /builddir/build/BUILD/dyninst-12.3.0-build/dyninst-12.3.0/dyninst-12.3.0/instructionAPI/src/AMDGPU/gfx908/InstructionDecoder-amdgpu-gfx908.C:32:

/builddir/build/BUILD/dyninst-12.3.0-build/dyninst-12.3.0/dyninst-12.3.0/instructionAPI/src/InstructionDecoderImpl.h:73:33: note: candidate: ‘virtual Dyninst::InstructionAPI::Expression::Ptr Dyninst::InstructionAPI::InstructionDecoderImpl::makeRegisterExpression(Dyninst::MachRegister, uint32_t)’
   73 |         virtual Expression::Ptr makeRegisterExpression(MachRegister reg, uint32_t num_elements = 1);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~

/builddir/build/BUILD/dyninst-12.3.0-build/dyninst-12.3.0/dyninst-12.3.0/instructionAPI/src/AMDGPU/gfx908/InstructionDecoder-amdgpu-gfx908.h:302:29: note: candidate: ‘Dyninst::InstructionAPI::Expression::Ptr Dyninst::InstructionAPI::InstructionDecoder_amdgpu_gfx908::makeRegisterExpression(Dyninst::MachRegister)’
  302 |             Expression::Ptr makeRegisterExpression(MachRegister registerID);
      |                             ^~~~~~~~~~~~~~~~~~~~~~

Not yet sure what's going on here.

Reproducible: Didn't try

Comment 1 Marek Polacek 2025-01-09 20:08:12 UTC
Reproduced.  Started with

commit 06557ba12b64c57368673c46a21b14cf4e6afb50
Author: Patrick Palka <ppalka>
Date:   Fri Sep 20 12:31:40 2024 -0400

    c++: CWG 2273 and non-constructors
    
    Our implementation of the CWG 2273 inheritedness tiebreaker seems to be
    incorrectly considering all member functions introduced via using, not
    just constructors.  This patch restricts the tiebreaker accordingly.

so I think the error is expected.

Comment 2 Patrick Palka 2025-01-09 23:16:49 UTC
Yeah, GCC is behaving correctly here AFAICT.

The bug seems to be fixed upstream in dyninst v13 by https://github.com/dyninst/dyninst/commit/42c3a4b497071e421686ded49ad0da406c8053ac

Comment 3 William Cohen 2025-02-02 22:40:38 UTC
The failed to build has been addressed with dyninst-13.0.0-4.fc42.

Comment 4 Fedora Update System 2025-02-05 16:34:52 UTC
FEDORA-2025-1098cd9319 (dyninst-13.0.0-4.fc42 and systemtap-5.3~pre17373816g7a71d34b-4.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-1098cd9319

Comment 5 Fedora Update System 2025-02-05 19:44:19 UTC
FEDORA-2025-a34f7f6ff8 (dyninst-13.0.0-4.fc43 and systemtap-5.3~pre17373816g7a71d34b-4.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-a34f7f6ff8

Comment 6 Fedora Update System 2025-02-06 15:31:27 UTC
FEDORA-2025-abe5b6468a (dyninst-13.0.0-5.fc42 and systemtap-5.3~pre17373816g7a71d34b-5.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-abe5b6468a

Comment 7 Fedora Update System 2025-02-06 15:32:13 UTC
FEDORA-2025-21483a849c (dyninst-13.0.0-5.fc43 and systemtap-5.3~pre17373816g7a71d34b-5.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-21483a849c

Comment 8 Fedora Update System 2025-02-06 17:37:37 UTC
FEDORA-2025-21483a849c (dyninst-13.0.0-5.fc43 and systemtap-5.3~pre17373816g7a71d34b-5.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2025-02-06 17:40:37 UTC
FEDORA-2025-abe5b6468a (dyninst-13.0.0-5.fc42 and systemtap-5.3~pre17373816g7a71d34b-5.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.