[lldb][test] Fix flaky DIL array subscript test by reducing array indexes (#141738) This test has been flaky on Linaro's Windows on Arm bot and I was able to reproduce it within 10 or so runs locally. When it fails it's because we failed to read the value of int_arr[100]. When that happens the memory looks like this: ``` [0x0000006bf88fd000-0x0000006bf8900000) rw- <-- sp (0x0000006bf88ffe20) [0x0000006bf8900000-0x0000025fec900000) --- <-- int_arr[100] (0x0000006bf8900070) ``` The first region is the stack and the stack pointer is pointing within that region, as expected. The second region is where we are trying to read int_arr[100] from and this is not mapped because we're trying to read above the start of the stack. Sometimes the test passes I think because ASLR / DYNAMICBASE moves the start of the stack down enough so there is some readable memory at the top. https://learn.microsoft.com/en-us/cpp/build/reference/dynamicbase?view=msvc-170 Note "Because ASLR can't be disabled on ARM, ARM64, or ARM64EC architectures, /DYNAMICBASE:NO isn't supported for these targets.". Which means on this bot, the layout is definitely being randomised. We don't need to be testing indexes this large. So I've changed the two test indexes to 3 (1 beyond the end) and 10 (a larger distance beyond the end). We know that index 42 always worked on the bot, so 10 should be fine, and did not fail locally.
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.