[all-commits] [llvm/llvm-project] ed524b: [llvm] Avoid resolving `.incbin` during symbol col...

Jan Svoboda via All-commits all-commits at lists.llvm.org
Mon Mar 2 11:59:38 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ed524ba0d4582a5017831394913093ae0a8ac15b
      https://github.com/llvm/llvm-project/commit/ed524ba0d4582a5017831394913093ae0a8ac15b
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2026-03-02 (Mon, 02 Mar 2026)

  Changed paths:
    A clang/test/CodeGen/asm_incbin.c
    M llvm/include/llvm/MC/MCParser/MCAsmParser.h
    M llvm/lib/MC/MCParser/AsmParser.cpp
    M llvm/lib/Object/ModuleSymbolTable.cpp

  Log Message:
  -----------
  [llvm] Avoid resolving `.incbin` during symbol collection (#172920)

With IO sandboxing enabled, Clang requires all FS accesses happen
through the one "true" VFS instance. That instance is currently not
being propagated into the assembly parser, and doing so would be super
involved. This triggers sandbox violations whenever an `.incbin`
directive is encountered, since the parser needs the VFS to open the
file.

However, it seems that `asm()` directives are only parsed to get the
symbols of an LLVM module, which cannot be affected by `.incbin`
directives. This PR adds an option to the asm parser to avoid resolving
`.incbin` directives when collecting module symbols, avoiding the
sandbox violation.



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