[all-commits] [llvm/llvm-project] 8106c8: [MLIR][Bytecode] Enforce alignment requirements (#...

Nikhil Kalra via All-commits all-commits at lists.llvm.org
Thu Sep 4 22:32:01 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8106c816eb8b279ee4220936c43a0e495d1bb1a0
      https://github.com/llvm/llvm-project/commit/8106c816eb8b279ee4220936c43a0e495d1bb1a0
  Author: Nikhil Kalra <nkalra at apple.com>
  Date:   2025-09-04 (Thu, 04 Sep 2025)

  Changed paths:
    M mlir/docs/BytecodeFormat.md
    M mlir/lib/Bytecode/Reader/BytecodeReader.cpp
    M mlir/unittests/Bytecode/BytecodeTest.cpp

  Log Message:
  -----------
  [MLIR][Bytecode] Enforce alignment requirements (#157004)

Adds a check that the bytecode buffer is aligned to any section
alignment requirements. Without this check, if the source buffer is not
sufficiently aligned, we may return early when aligning the data
pointer. In that case, we may end up trying to read successive sections
from an incorrect offset, giving the appearance of invalid bytecode.

This requirement is documented in the bytecode unit tests, but is not
otherwise documented in the code or bytecode reference.



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