[all-commits] [llvm/llvm-project] a6a2a7: [OpenACC] Fix Crash on collapse that doesn't check...

Florian Mayer via All-commits all-commits at lists.llvm.org
Mon Apr 13 17:42:03 PDT 2026


  Branch: refs/heads/users/fmayer/spr/main.hwasan-always-use-unused-bits-in-free-tags
  Home:   https://github.com/llvm/llvm-project
  Commit: a6a2a717c57aaa3fd3beb98bfa55c2f2f285a024
      https://github.com/llvm/llvm-project/commit/a6a2a717c57aaa3fd3beb98bfa55c2f2f285a024
  Author: Erich Keane <ekeane at nvidia.com>
  Date:   2026-04-13 (Mon, 13 Apr 2026)

  Changed paths:
    M clang/lib/Sema/TreeTransform.h
    M clang/test/SemaOpenACC/loop-construct-collapse-clause.cpp

  Log Message:
  -----------
  [OpenACC] Fix Crash on collapse that doesn't check its transform (#191836)

GH191833 reports a problem with tree transformation of a collapse clause
when the expression in the clause is invalid. This patch makes sure we
skip out of transforming this clause if it ever encounters an invalid
expression.

I also analyzed the rest of the clauses in this visitor and found 1
other that was suspicious, so I added a check for that one as well. The
rest seemingly were all done correctly.

Fixes: #191833


  Commit: f0f96c7f788b90e48a6925437e918c3196913325
      https://github.com/llvm/llvm-project/commit/f0f96c7f788b90e48a6925437e918c3196913325
  Author: hidekisaito <hidekido at amd.com>
  Date:   2026-04-13 (Mon, 13 Apr 2026)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp
    A llvm/test/CodeGen/AMDGPU/lower-intrinsics-noalias-metadata.ll

  Log Message:
  -----------
  [AMDGPU] Preserve scoped-AA metadata when lowering barriers to wave_barrier (#191858)

AMDGPULowerIntrinsics downgrades s_barrier/s_barrier_wait to
wave_barrier on single-wave workgroups, but dropped all metadata from
the original instruction.  The lost !noalias and !alias.scope metadata
prevented MemorySSA's optimized walker from skipping past the barrier,
causing isClobberedInFunction to walk further and reach unrelated
side-effecting defs (e.g. tensor_load_to_lds) that are misclassified
as clobbers — ultimately losing !amdgpu.noclobber on global loads.

Copy !noalias, !alias.scope, and !tbaa from the old instruction to the
replacement wave_barrier.

Made-with: Cursor


  Commit: af0471c1918ab76915bb3750655ffd3281a0b9e7
      https://github.com/llvm/llvm-project/commit/af0471c1918ab76915bb3750655ffd3281a0b9e7
  Author: Jason Molenda <jmolenda at apple.com>
  Date:   2026-04-13 (Mon, 13 Apr 2026)

  Changed paths:
    M lldb/include/lldb/Target/Process.h
    M lldb/include/lldb/lldb-enumerations.h
    M lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
    M lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
    M lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
    M lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp
    M lldb/source/Plugins/Process/scripted/ScriptedProcess.h
    M lldb/tools/debugserver/source/DNB.cpp
    M lldb/tools/debugserver/source/DNB.h
    M lldb/tools/debugserver/source/DNBDefs.h
    M lldb/tools/debugserver/source/MacOSX/MachProcess.h
    M lldb/tools/debugserver/source/MacOSX/MachProcess.mm
    M lldb/tools/debugserver/source/RNBRemote.cpp

  Log Message:
  -----------
  [lldb][Darwin] Fetch detailed binary info in chunks (#190720)

When binaries have been loaded into a process on Darwin, lldb sends a
jGetLoadedDynamicLibrariesInfos packet to get the filepath, uuid, load
address, and detailed information from the mach header/load commands.
For a large UI app, the number of binaries that can be loaded (through
various dependencies) can exceed a thousand these days, and requesting
detailed information on all of those can result in debugserver
allocating too much memory when running in constrained environments, and
being killed.

In 2023 I laid the groundwork to fetch detailed information in chunks,
instead of one large request. The main challenge with this is when we
first attach to a process that is running, we send a "tell me about all
binaries loaded", and that prevents lldb from chunking the reply; the
packet design for jGetLoadedDynamicLibrariesInfos assumes the entire
reply is sent in one packet, instead of the typical gdb remote serial
protocol trick of a response with partial data starting with 'm' and a
response with a complete reply starting with 'l'. The 2023 change is to
add a new key to this packet, `report_load_commands` and when that is
set to `false`, only the load address of the binaries is reported.

lldb then uses the array of load addresses of all the binaries to fetch
detailed information about them in smaller groupings.

This PR implements the lldb side of that work.

Process::GetLoadedDynamicLibrariesInfos now takes a `bool
include_mh_and_load_commands`, ProcessGDBRemote sends that as an
argument in the jGetLoadedDynamicLibrariesInfos packet.

DynamicLoaderMacOS::DoInitialImageFetch is changed to only get the load
addresses on initial attach. If the reply includes the full binary
information (not just load addresses) -- when talking to an old
debugserver -- we will use that information instead of re-fetching it.
On a newer debugserver that only sent the load addresses, we'll send
this list of addresses to the standard method we use when dyld has told
us to load binaries at addresses already.

DynamicLoaderMacOS::AddBinaries, which takes a list of addresses and
fetches detailed information about them, is updated to request only 600
binaries at a time. A typical UI app will be in the 700-1000 binary
range these days, so this will turn one large fetch into two, in most
cases. There are some system UI processes that have many dependencies
that could require three fetches. I picked this number so most debug
sessions will be handled by two requests.

In debugserver MachProcess::FormatDynamicLibrariesIntoJSON, I removed
the obsolete-for-three-years-now `mod_date` field. I was sending back
the binary filepaths for this "don't send the detailed information"
version of the packet - I don't need that, and it just increases the
size, so I stopped sending filepaths in this mode.

I also added a new field for when we ARE sending detailed information,
`sizeof_mh_and_loadcmds`. I don't use this in lldb yet, but when we are
told about a binary and need to read it from memory today, we have an
initial read to get the mach header, which tells us the size of the load
commands. Then we have a second read of the mach header plus load
commands, before we can start binary processing in earnest. This is an
extra read packet and very unnecessary, given that debugserver knows how
large the mach header + load commands are. So I'm returning it here, and
at some point I'll find a way to pipe that into a new memory object file
creation method in lldb. It's one of those "I should really find a way
to remove that extra read some day" cleanups, and while I was in this
area, I'd add this first piece of that.

I don't have a test for this. I've been thinking about an API test that
creates 700 dylibs with empty functions in each, runs it, and confirms
all of the dylibs were loaded. I'd have to grab a packet log to be
completely sure we didn't read the full binary list in one go. But I
worry that compiling and linking even 700 do-nothing dylibs might be too
much. Maybe I should add a setting in DynamicLoaderMacOS::AddBinaries to
reduce the maximum number of binaries that can be read at once, and have
a small nubmer of dylibs. When by-hand testing this, I had a maximum of
5 binaries being queried in one packet.

rdar://109428337


  Commit: 87eabed13056b8ebc6657d4175d551efbd3c3d22
      https://github.com/llvm/llvm-project/commit/87eabed13056b8ebc6657d4175d551efbd3c3d22
  Author: Haowei <haowei at google.com>
  Date:   2026-04-13 (Mon, 13 Apr 2026)

  Changed paths:
    M llvm/utils/lit/lit/llvm/config.py

  Log Message:
  -----------
  [lit] Prevent "lld" from being substituted by LIT in llvm-driver tests (#191893)

We are seeing test failures in "passthrough-lld.test" as LIT
substitutes the "ld.lld" string in the test file to the full
path to the lld. However, the "-flavor" flag does not expect
a full path. It just need a name of the linker so it fails.
This patch modifies the lld matching regex in the use_lld
function in llvm/utils/lit/lit/llvm/config.py. It prevents
LIT from substitute any lld tool strings that are not
standalone.


  Commit: 72df1fc645116566cc7240b48c0bc824b504dc47
      https://github.com/llvm/llvm-project/commit/72df1fc645116566cc7240b48c0bc824b504dc47
  Author: Florian Mayer <fmayer at google.com>
  Date:   2026-04-13 (Mon, 13 Apr 2026)

  Changed paths:
    M llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
    M llvm/test/Instrumentation/HWAddressSanitizer/alloca.ll

  Log Message:
  -----------
  [HWASan] Add hwasan-tag-bits flag (#191088)

This can be used to make sure the stack tagging does not use the top bit
of
the pointer. This is useful when HWASan is used in combination with
signed-integer-overflow detection. Some code uses arithmetic on intptr_t
that overflows for sufficiently large pointers.


  Commit: 561227533c1f5faa14328d607eaa24c14ebb42ed
      https://github.com/llvm/llvm-project/commit/561227533c1f5faa14328d607eaa24c14ebb42ed
  Author: Florian Mayer <fmayer at google.com>
  Date:   2026-04-13 (Mon, 13 Apr 2026)

  Changed paths:
    M clang/lib/Sema/TreeTransform.h
    M clang/test/SemaOpenACC/loop-construct-collapse-clause.cpp
    M lldb/include/lldb/Target/Process.h
    M lldb/include/lldb/lldb-enumerations.h
    M lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
    M lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
    M lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
    M lldb/source/Plugins/Process/scripted/ScriptedProcess.cpp
    M lldb/source/Plugins/Process/scripted/ScriptedProcess.h
    M lldb/tools/debugserver/source/DNB.cpp
    M lldb/tools/debugserver/source/DNB.h
    M lldb/tools/debugserver/source/DNBDefs.h
    M lldb/tools/debugserver/source/MacOSX/MachProcess.h
    M lldb/tools/debugserver/source/MacOSX/MachProcess.mm
    M lldb/tools/debugserver/source/RNBRemote.cpp
    M llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp
    A llvm/test/CodeGen/AMDGPU/lower-intrinsics-noalias-metadata.ll
    M llvm/utils/lit/lit/llvm/config.py

  Log Message:
  -----------
  [𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]


Compare: https://github.com/llvm/llvm-project/compare/b41f43941c62...561227533c1f

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list