[all-commits] [llvm/llvm-project] 480ba1: [Driver][HIP/SPIRV] Fix crash when llvm-link is ex...

Manuel Carrasco via All-commits all-commits at lists.llvm.org
Wed May 6 06:41:18 PDT 2026


  Branch: refs/heads/users/mgcarrasco/fix-llvm-link
  Home:   https://github.com/llvm/llvm-project
  Commit: 480ba1e61df5dbe1d719e9b0a76bf0ca228840eb
      https://github.com/llvm/llvm-project/commit/480ba1e61df5dbe1d719e9b0a76bf0ca228840eb
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-05-06 (Wed, 06 May 2026)

  Changed paths:
    M clang/lib/Driver/ToolChains/HIPAMD.cpp
    A clang/test/Driver/hip-spirv-linker-crash.c

  Log Message:
  -----------
  [Driver][HIP/SPIRV] Fix crash when llvm-link is executed.

There is a design limitation that is forwarding flags to llvm-link
when it shouldn't happen. This commit fixes this issue by sanitizing
the arguments forwarded to llvm-link.

This may happen when clang-linker-wrapper eventually calls clang.
Crash reproducer is here: https://gcc.godbolt.org/z/rxvWcvan3.

The fix is based on MrSidims's old PR (#183492).

Co-authored-by: Dmitry Sidorov <18708689+MrSidims at users.noreply.github.com>
Co-authored-by: Manuel Carrasco <manuel.carrasco at amd.com>



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