<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - LLDB crash on a pascal procedural type use"
href="https://bugs.llvm.org/show_bug.cgi?id=42908">42908</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>LLDB crash on a pascal procedural type use
</td>
</tr>
<tr>
<th>Product</th>
<td>lldb
</td>
</tr>
<tr>
<th>Version</th>
<td>9.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>lldb-dev@lists.llvm.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>argb32@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>jdevlieghere@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>LLDB crashes if a variable of procedural type (methods as well) is examined -
stack trace included.
Reproduced with LLDB v9.0.0 (nightly build) on Windows10 64bit as well as LLDB
v6.0.0 on Linux 64 bit.
On OSX with v360.1.70 it doesn't crash but outputs error "unable to determine
byte size".
Used Free Pascal Compiler v3.0.2.
Compiler options: -gw2 -CroiO -O1
Probably it's not a directly supported compiler but it outputs DWARF2 debug
information and the procedural type is nothing but a pointer.
Sample program:
----------
{$MODE Delphi}
program Test33;
type
TProcedure = procedure(); cdecl;
TTest = class
proc : TProcedure;
constructor Create();
function t(): Integer;
end;
constructor TTest.Create();
var a: integer;
begin
a := 9;
proc := nil;
WriteLn(a);
end;
function TTest.t(): Integer;
begin
Result := 84;
end;
var
Test : TTest;
begin
Test := TTest.create();
end.
----------
LLDB crash trace (Windows x64 build):
Assertion failed: Ty->isSized() && "Cannot getTypeInfo() on a type that is
unsized!", file C:\src\llvm_package_363781\llvm\lib\IR\DataLayout.cpp, line 699
Stack dump:
0. Program arguments: C:\app\LLVM\bin\lldb-mi.exe Z:\src\g3ge\bin\Test33.exe
0x00007FF74756CED6 (0x00007FF74756CED0 0x00007FFF57CA9241 0x0000009000000002
0x00007FFF57D78510)
0x00007FFF57CFD09B (0x0000000000000201 0x00007FFF00000000 0x00000000000002BB
0x00007FFF33863D9C), raise() + 0x1DB bytes(s)
0x00007FFF57CFE131 (0x00007FFF00000003 0x00007FFF00000003 0x00007FFF33863D9C
0x00007FFF34F4ED00), abort() + 0x31 bytes(s)
0x00007FFF57CFFE31 (0x00000000000002BB 0x00007FFF33863D9C 0x000048B16AD5E12B
0x0000021E04B92C60), _get_wpgmptr() + 0x1C31 bytes(s)
0x00007FFF57D0011F (0x0000000000008A7E 0x00007FFF3374FA3C 0x00007FFF3376D9FE
0x0000021E04BB6858), _wassert() + 0x3F bytes(s)
0x00007FFF33454892 (0x000000904498A9C8 0x0000000000000001 0x0000021E04BC4B40
0x000000904498A8C0), ??0SBBlock@lldb@@AEAA@PEAVBlock@lldb_private@@@Z() +
0x2DAF22 bytes(s)
0x00007FFF318A08C9 (0x0000021E04BB6AF8 0x0000021E01DA4D40 0x0000021E01DA0CC0
0x00007FFF00000000),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x8D5D39
bytes(s)
0x00007FFF3189E0BB (0x0000000000000210 0x0000021E01DA1C80 0x0000021E01DA1C80
0x0000021E04B5D9D0),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x8D352B
bytes(s)
0x00007FFF315EAE71 (0x000048B16AD5EBAB 0x0000000000000008 0x0000021E00000008
0x000000904498AEF0),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x6202E1
bytes(s)
0x00007FFF315E8F5A (0x0000000000000000 0x00007FFF57C99686 0x0000000000000080
0x0000000000000080),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x61E3CA
bytes(s)
0x00007FFF315E955F (0x000000904498AFB0 0x0000021E01DA1C80 0x000000904498AFC0
0x0000002000000002),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x61E9CF
bytes(s)
0x00007FFF317928C2 (0x0000021E04B002D0 0x0000000000000000 0x000000000000000B
0x00007FFF2FDD39B5),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x7C7D32
bytes(s)
0x00007FFF31792CED (0x0000021E04AFA570 0x0000021E04BB6FE0 0x0000021E04BBE3D0
0x0000021E04B4C860),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x7C815D
bytes(s)
0x00007FFF31792E55 (0x0000021E03B4D340 0x000000904498B3B8 0x000000904498BB00
0x00007FFF57C988DB),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x7C82C5
bytes(s)
0x00007FFF317930BD (0x0000021E01DA1C80 0x0000000000000000 0x894300203A010000
0x0000000001E30D00),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x7C852D
bytes(s)
0x00007FFF31579CCD (0x0000021E049B4A50 0x0000021E04BBE530 0x000000904498CBE8
0x00007FFF324F7000),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x5AF13D
bytes(s)
0x00007FFF3157240C (0x0000000000000004 0x000000904498CC78 0x0000000000000000
0x0001000001010001),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x5A787C
bytes(s)
0x00007FFF3157696A (0x00007FFF57D000E0 0x00007FFF3334F4F9 0x000048B16AD58B5B
0x0000021E04AFB360),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x5ABDDA
bytes(s)
0x00007FFF3157D6D1 (0x000000900000030C 0x0000000000000000 0x5F62646C6C5F5F24
0x0000000072707865),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x5B2B41
bytes(s)
0x00007FFF315608FF (0x0000000000000000 0x0000021E04AFB6D0 0x0000000000000000
0x0000000000000000),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x595D6F
bytes(s)
0x00007FFF2FB7C55A (0x0000021E049B7440 0x0000021E049B7420 0x0000021E049AAAF0
0x00007FFF33747A0F),
?SetSP@SBTrace@lldb@@IEAAXAEBV?$shared_ptr@VProcess@lldb_private@@@std@@@Z() +
0x5992A bytes(s)
0x00007FFF31E64325 (0x000000904498EF68 0x00007FFF46255501 0x0000021E03958300
0x000000904498E790),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0xE99795
bytes(s)
0x00007FFF2FB74A1B (0x0000000000000001 0x0000021E0397E060 0x0000021E04B695D0
0x000000904498EE20),
?SetSP@SBTrace@lldb@@IEAAXAEBV?$shared_ptr@VProcess@lldb_private@@@std@@@Z() +
0x51DEB bytes(s)
0x00007FFF2FB74C77 (0x0000021E03958860 0x0000021E0395A220 0x0000021E00000000
0x0000021E01DA0000),
?SetSP@SBTrace@lldb@@IEAAXAEBV?$shared_ptr@VProcess@lldb_private@@@std@@@Z() +
0x52047 bytes(s)
0x00007FFF2FB40C6C (0x000000904498F130 0x00007FFF57C988DB 0x0000009000000000
0x0000021E01DA0000),
?SetSP@SBTrace@lldb@@IEAAXAEBV?$shared_ptr@VProcess@lldb_private@@@std@@@Z() +
0x1E03C bytes(s)
0x00007FFF2F959F13 (0x0000000000000002 0x0000021E03B11748 0x000000904498EFD0
0x0000021E04AE81E8), ??1SBCommandPluginInterface@lldb@@UEAA@XZ() + 0xA5B83
bytes(s)
0x00007FFF2FA45E60 (0x0000000000000002 0x00007FFF00000000 0x000000000000000F
0x00007FFF462555E3),
?get@SBBroadcaster@lldb@@IEBAPEAVBroadcaster@lldb_private@@XZ() + 0x37F20
bytes(s)
0x00007FFF2F667BB3 (0x000000000000000F 0x0000000000000000 0x00007FFF33776388
0x0000000000000035),
?EvaluateExpression@SBFrame@lldb@@QEAA?AVSBValue@2@PEBDAEBVSBExpressionOptions@2@@Z()
+ 0x3A3 bytes(s)
0x00007FFF2F6676A2 (0x0000000000000000 0x0000000000000000 0x000090E39A0CB500
0x000000904498F3B8),
?EvaluateExpression@SBFrame@lldb@@QEAA?AVSBValue@2@PEBD@Z() + 0x312 bytes(s)
0x00007FF74753454F (0x000000000000000F 0x00007FF7475982D0 0x616572632D726100
0x20646E616D006574)
0x00007FF74753D0DA (0x000000904498F757 0x00007FF7475B5148 0x000000904498FB38
0x000000904498FA08)
0x00007FF74753F221 (0x0000021E01E30304 0x0000000000000022 0x0000021E038B69D0
0x000000904498F9C0)
0x00007FF74755DAA5 (0x0000021E038B6C00 0x0000021E038A09E0 0x0000000000000000
0x00007FFF33759D42)
0x00007FF74755CF60 (0x00007FFF57D784B8 0x000000904498FD6F 0x0000000000000000
0x007325203A6E6F69)
0x00007FF74756195E (0x0000021E01E3B638 0x0000021E01E3B620 0x0000000000000002
0x0000000000000000)
0x00007FF747560ED9 (0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000)
0x00007FF74759599C (0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000)
0x00007FFF57EB4034 (0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000), BaseThreadInitThunk() + 0x14 bytes(s)
0x00007FFF5AA83691 (0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000), RtlUserThreadStart() + 0x21 bytes(s)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>