LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 21800 - MSABI Record Layout is broken with external sources
Summary: MSABI Record Layout is broken with external sources
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: LLVM Codegen (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P normal
Assignee: David Majnemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-09 18:18 PST by Zachary Turner
Modified: 2015-08-14 12:03 PDT (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zachary Turner 2014-12-09 18:18:31 PST
To reproduce this, one can run the following LLDB test:

D:\python_src\Python-2.7.8\PCbuild\python_d.exe  D:\src\llvm\tools\lldb\test/dotest.py -q --arch=i686 --executable D:/src/llvm/build/ninja/bin/lldb.exe -s D:/src/llvm/build/ninja/lldb-test-traces -u CXXFLAGS -u CFLAGS -C D:\src\llvm\build\ninja\bin\clang.exe -p TestDataFormatterLibcxxVBool.py D:\src\llvm\tools\lldb\test\functionalities\data-formatter\data-formatter-stl\libcxx\vbool

You will get the following assertion failure:

Assertion failed: Allowed && "Externally-placed field cannot be placed here", file ..\..\tools\clang\lib\AST\RecordLayoutBuilder.cpp, line 1738

This is happening because in RecordLayoutBuilder.cpp, the following check in ASTContext::getASTRecordLayout():

  if (isMsLayout(D) && !D->getASTContext().getExternalSource()) {
    NewEntry = BuildMicrosoftASTRecordLayout(D);
  }

is failing since getExternalSource() is returning true, so it is trying to use non-MSABI record layout.

Data formatter tests need to be disabled on Windows until this is fixed, so please re-enable them, or file a bug to re-enable them, once this is fixed.
Comment 1 Zachary Turner 2015-08-14 12:03:11 PDT
This was fixed a long time ago.