Bug 110438
| Summary: | dynamic_cast fails depending on linking combination | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 3 | Reporter: | Göran Uddeborg <goeran> | ||||
| Component: | gcc | Assignee: | Jakub Jelinek <jakub> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | |||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 3.0 | CC: | jason | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | i386 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2003-11-20 00:28:41 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: | |||||||
| Attachments: |
|
||||||
Created attachment 96057 [details]
Test case referred to in the initial report
If you want the ar_dlopen testcase to work, you need to link it with -WL,--export-dynamic. |
From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030314 Description of problem: An application we have link different parts in different ways, archive library, shared library, and at run time with dlopen(). In some cases we have found dynamic_cast fails. I believe the attached test case best illustrates this. It is essentially the same function, consisting of a main function which creates a class object and sends this to a test function. The class implementation can be linked as a shared or archive library; the test function can be linked as a shared library or at run time. The dynamic cast fails in the combination classes in archive library and run time dlopen, but nowhere else. Version-Release number of selected component (if applicable): gcc-3.2.3-20 How reproducible: Always Steps to Reproduce: 1.Unpack enclosed test case with "tar xfz testCast.tar.gz" 2.cd testCast 3.make Actual Results: ar_dlopen case fails. All other succeeds. Additional info: FWIW, this also happens on Fedora Core 1 with gcc-3.3.2-1.