[llvm-bugs] [Bug 52490] New: Runtime crash can occur when modules built with -frtti and -fno-rtti are linked into a single app.

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Nov 12 08:02:08 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=52490

            Bug ID: 52490
           Summary: Runtime crash can occur when modules built with -frtti
                    and -fno-rtti are linked into a single app.
           Product: clang
           Version: unspecified
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: kintzley at adobe.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

Created attachment 25447
  --> https://bugs.llvm.org/attachment.cgi?id=25447&action=edit
simple example app

Runtime crash can occur when modules built with -frtti and -fno-rtti are linked
into a single app. Basically, we get two different definitions of
std::bad_function_call and the discrepancy in memory layout can cause a crash.
See attached example. It's very simple, only two functions and a script to
build it. See also additional notes about link order in that script
'makeAndRun'.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211112/9246aff0/attachment.html>


More information about the llvm-bugs mailing list