[LLVMbugs] [Bug 13555] New: RTTI information unavailable from shared libraries only when method overriding

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Aug 8 15:01:49 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13555

             Bug #: 13555
           Summary: RTTI information unavailable from shared libraries
                    only when method overriding
           Product: clang
           Version: 3.1
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: clemahieu at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9014
  --> http://llvm.org/bugs/attachment.cgi?id=9014
Reduced XCode project files.

Summary: When a program dynamically loads a shared library and receives an
object instantiated in the shared library, if the class of the object overrides
a method the RTTI information not retrievable.  If the class of the object does
not override a method the RTTI information is available as expected.

These test cases were tested with XCode 4.3, 4.4, and 4.4.1.

Steps to Reproduce:
Attached is an XCode project.

Establishing good behavior:
Open the project and build scheme test2, the shared library.  Then build scheme
testproj, the application.  Run the application and note that it will complete
successfully, result1 and result2 are both true.

Demonstrating incorrect behavior:
Edit test3.h and uncomment "void foo () override;" Edit test3.cpp and uncomment
method c2::foo Build scheme test2, build scheme testproj.  Run testproj. 
Notice the incorrect output, result1 is false while result2 remains true.  The
RTTI was lost when overriding a method.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list