[all-commits] [llvm/llvm-project] 462b10: [clang][ExtractAPI] Fix assertion on invalid UTF-8...

Patryk Stefanski via All-commits all-commits at lists.llvm.org
Tue Jul 28 09:36:56 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 462b109cbcfe5d8adb46af4e6f82dc96c0a5c9f7
      https://github.com/llvm/llvm-project/commit/462b109cbcfe5d8adb46af4e6f82dc96c0a5c9f7
  Author: Patryk Stefanski <patryk.stefanski at protonmail.com>
  Date:   2026-07-28 (Tue, 28 Jul 2026)

  Changed paths:
    M clang/docs/ReleaseNotes.md
    M clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
    A clang/test/ExtractAPI/invalid_utf8_doc_comment.c

  Log Message:
  -----------
  [clang][ExtractAPI] Fix assertion on invalid UTF-8 in doc comments (#212394)

A doc comment can contain invalid UTF-8. The raw bytes reach
serializeDocComment, which assigned them to a llvm::json::Value,
tripping its valid-UTF-8 assertion. This is hit by legacy headers that
are not UTF-8 encoded, which compile fine but crash -extract-api.

Sanitize with json::isUTF8/fixUTF8 before serializing.

Fixes #212393



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