Re: [lldb-dev] [Release-testers] [9.0.0 Release] Release Candidate 1 is here

2019-08-06 Thread Dimitry Andric via lldb-dev
On 29 Jul 2019, at 16:32, Hans Wennborg via Release-testers 
 wrote:
> 
> 9.0.0-rc1 was just tagged from the release_90 branch at r367217
> (tagged as llvmorg-9.0.0-rc1 in the Git monorepo).

The sanitizer tests went a lot better now, thanks to Alexander Richardson's 
patches in https://bugs.llvm.org/show_bug.cgi?id=40761 
(https://reviews.llvm.org/D65221 and https://reviews.llvm.org/D65705).

Uploaded:

SHA256 (clang+llvm-9.0.0-rc1-amd64-unknown-freebsd11.tar.xz) = 
6a6c04e2d87ef3d8b8671b175afe0a59d3f5fee6d758d3c3383a6af3031b76a4
SHA256 (clang+llvm-9.0.0-rc1-i386-unknown-freebsd11.tar.xz) = 
d34d0d46d93576c27e6ab2a5fa4712c80fe0580dd5ca9efadd5b0b2a0b1a150f

I had to apply a number of other patches (see attachments) to make the 
sanitizer tests work at all, and for a few other issues:

* https://bugs.llvm.org/show_bug.cgi?id=42892 - After r356631, 
Sanitizer-i386-Test faills to link on FreeBSD
* https://bugs.llvm.org/show_bug.cgi?id=42893 - FreeBSD needs 
LD_32_LIBRARY_PATH support in lit for 32-bit dynamic ASan tests
* https://bugs.llvm.org/show_bug.cgi?id=42894 - FreeBSD needs -pthread link 
flag for dynamic ASan tests

Main test results on amd64-freebsd11:

  
  Unexpected Passing Tests (7):
  AddressSanitizer-i386-freebsd-dynamic :: 
TestCases/interception_failure_test.cc
  AddressSanitizer-x86_64-freebsd-dynamic :: 
TestCases/interception_failure_test.cc
  lldb-Suite :: api/multiple-targets/TestMultipleTargets.py
  lldb-Suite :: functionalities/avoids-fd-leak/TestFdLeak.py
  lldb-Suite :: 
functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py
  lldb-Suite :: lang/cpp/namespace/TestNamespaceLookup.py
  lldb-Suite :: python_api/thread/TestThreadAPI.py

  
  Failing Tests (120):
  AddressSanitizer-Unit :: 
./Asan-i386-calls-Dynamic-Test/AddressSanitizer.ShadowGapTest
  AddressSanitizer-Unit :: 
./Asan-i386-inline-Dynamic-Test/AddressSanitizer.ShadowGapTest
  AddressSanitizer-i386-freebsd :: TestCases/Posix/fread_fwrite.cc
  AddressSanitizer-i386-freebsd-dynamic :: TestCases/Posix/fread_fwrite.cc
  Builtins-i386-freebsd :: floatundixf_test.c
  LLDB :: 
Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputConsole.test
  LLDB :: 
Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputFile.test
  LLDB :: Driver/LocalLLDBInit.test
  LLDB :: Driver/TestConvenienceVariables.test
  LLDB :: ExecControl/StopHook/stop-hook-threads.test
  LLDB :: ExecControl/StopHook/stop-hook.test
  LLDB :: Expr/TestIRMemoryMap.test
  LLDB :: Register/x86-64-gp-read.test
  LLDB :: Register/x86-64-gp-write.test
  LLDB :: Register/x86-64-read.test
  LLDB :: Register/x86-64-write.test
  LLDB :: Register/x86-64-ymm-read.test
  LLDB :: Register/x86-64-ymm-write.test
  LLDB :: Register/x86-mm-xmm-read.test
  LLDB :: Register/x86-mm-xmm-write.test
  LLDB :: SymbolFile/DWARF/find-basic-function.cpp
  LLDB :: SymbolFile/DWARF/find-basic-namespace.cpp
  LLDB :: SymbolFile/DWARF/find-basic-type.cpp
  LLDB :: SymbolFile/DWARF/find-basic-variable.cpp
  LLDB :: SymbolFile/DWARF/find-method.cpp
  LLDB :: tools/lldb-mi/breakpoint/break-insert.test
  LLDB :: tools/lldb-mi/data/data-info-line.test
  LLDB :: tools/lldb-mi/exec/exec-interrupt.test
  LLDB :: tools/lldb-mi/exec/exec-next-instruction.test
  LLDB :: tools/lldb-mi/exec/exec-next.test
  LLDB :: tools/lldb-mi/exec/exec-step-instruction.test
  LLDB :: tools/lldb-mi/exec/exec-step.test
  LLVM :: tools/yaml2obj/elf-override-shoffset.yaml
  LLVM :: tools/yaml2obj/elf-override-shsize.yaml
  MemorySanitizer-Unit :: 
./Msan-x86_64-Test/MemorySanitizer.SmallPreAllocatedStackThread
  MemorySanitizer-Unit :: 
./Msan-x86_64-Test/MemorySanitizer.bind_getsockname
  MemorySanitizer-Unit :: ./Msan-x86_64-Test/MemorySanitizer.confstr
  MemorySanitizer-Unit :: ./Msan-x86_64-Test/MemorySanitizer.mbrtowc
  MemorySanitizer-Unit :: ./Msan-x86_64-Test/MemorySanitizer.swprintf
  MemorySanitizer-Unit :: ./Msan-x86_64-Test/MemorySanitizer.valloc
  MemorySanitizer-Unit :: 
./Msan-x86_64-with-call-Test/MemorySanitizer.SmallPreAllocatedStackThread
  MemorySanitizer-Unit :: 
./Msan-x86_64-with-call-Test/MemorySanitizer.bind_getsockname
  MemorySanitizer-Unit :: 
./Msan-x86_64-with-call-Test/MemorySanitizer.confstr
  MemorySanitizer-Unit :: 
./Msan-x86_64-with-call-Test/MemorySanitizer.mbrtowc
  MemorySanitizer-Unit :: 
./Msan-x86_64-with-call-Test/MemorySanitizer.swprintf
  MemorySanitizer-Unit :: 
./Msan-x86_64-with-call-Test/MemorySanitizer.valloc
  MemorySanitizer-X86_64 :: dtls_test.c
  SanitizerCommon-asan-i386-FreeBSD :: Posix/devname_r.cc
  SanitizerCommon-asan-i386-FreeBSD :: Posix/weak_hook_test.cc
  SanitizerCommon-asan-x86_64-FreeBSD :: Posix/weak_hook_test.cc
  SanitizerCommon-msan-

[lldb-dev] [Bug 42908] New: LLDB crash on a pascal procedural type use

2019-08-06 Thread via lldb-dev
https://bugs.llvm.org/show_bug.cgi?id=42908

Bug ID: 42908
   Summary: LLDB crash on a pascal procedural type use
   Product: lldb
   Version: 9.0
  Hardware: PC
OS: All
Status: NEW
  Severity: normal
  Priority: P
 Component: All Bugs
  Assignee: lldb-dev@lists.llvm.org
  Reporter: arg...@gmail.com
CC: jdevliegh...@apple.com, llvm-b...@lists.llvm.org

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 
0x7FF74756CED6 (0x7FF74756CED0 0x7FFF57CA9241 0x0092
0x7FFF57D78510)
0x7FFF57CFD09B (0x0201 0x7FFF 0x02BB
0x7FFF33863D9C), raise() + 0x1DB bytes(s)
0x7FFF57CFE131 (0x7FFF0003 0x7FFF0003 0x7FFF33863D9C
0x7FFF34F4ED00), abort() + 0x31 bytes(s)
0x7FFF57CFFE31 (0x02BB 0x7FFF33863D9C 0x48B16AD5E12B
0x021E04B92C60), _get_wpgmptr() + 0x1C31 bytes(s)
0x7FFF57D0011F (0x8A7E 0x7FFF3374FA3C 0x7FFF3376D9FE
0x021E04BB6858), _wassert() + 0x3F bytes(s)
0x7FFF33454892 (0x00904498A9C8 0x0001 0x021E04BC4B40
0x00904498A8C0), ??0SBBlock@lldb@@AEAA@PEAVBlock@lldb_private@@@Z() +
0x2DAF22 bytes(s)
0x7FFF318A08C9 (0x021E04BB6AF8 0x021E01DA4D40 0x021E01DA0CC0
0x7FFF),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x8D5D39
bytes(s)
0x7FFF3189E0BB (0x0210 0x021E01DA1C80 0x021E01DA1C80
0x021E04B5D9D0),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x8D352B
bytes(s)
0x7FFF315EAE71 (0x48B16AD5EBAB 0x0008 0x021E0008
0x00904498AEF0),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x6202E1
bytes(s)
0x7FFF315E8F5A (0x 0x7FFF57C99686 0x0080
0x0080),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x61E3CA
bytes(s)
0x7FFF315E955F (0x00904498AFB0 0x021E01DA1C80 0x00904498AFC0
0x0022),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x61E9CF
bytes(s)
0x7FFF317928C2 (0x021E04B002D0 0x 0x000B
0x7FFF2FDD39B5),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x7C7D32
bytes(s)
0x7FFF31792CED (0x021E04AFA570 0x021E04BB6FE0 0x021E04BBE3D0
0x021E04B4C860),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x7C815D
bytes(s)
0x7FFF31792E55 (0x021E03B4D340 0x00904498B3B8 0x00904498BB00
0x7FFF57C988DB),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x7C82C5
bytes(s)
0x7FFF317930BD (0x021E01DA1C80 0x 0x894300203A01
0x01E30D00),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x7C852D
bytes(s)
0x7FFF31579CCD (0x021E049B4A50 0x021E04BBE530 0x00904498CBE8
0x7FFF324F7000),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x5AF13D
bytes(s)
0x7FFF3157240C (0x0004 0x00904498CC78 0x
0x000101010001),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x5A787C
bytes(s)
0x7FFF3157696A (0x7FFF57D000E0 0x7FFF3334F4F9 0x48B16AD58B5B
0x021E04AFB360),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x5ABDDA
bytes(s)
0x7FFF3157D6D1 (0x0090030C 0x 0x5F62646C6C5F5F24
0x72707865),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x5B2B41
bytes(s)
0x7FFF315608FF (0x 0x021E04AFB6D0 0x
0x),
?SetSymbol@SBSymbol@lldb@@AEAAXPEAVSymbol@lldb_private@@@Z() + 0x595D6F
bytes(s)
0x7FFF2FB7C55A (0x021E049B744