Linux SPARSE checker discussions
 help / color / mirror / Atom feed
* [PATCH 00/20] Sanitizer fixes, LLVM updates, and CI workflow
@ 2026-10-19 17:56 Bart Van Assche
  2026-10-19 17:56 ` [PATCH 01/20] doc: Update maintainer and mirror information Bart Van Assche
                   ` (19 more replies)
  0 siblings, 20 replies; 26+ messages in thread
From: Bart Van Assche @ 2026-10-19 17:56 UTC (permalink / raw)
  To: linux-sparse; +Cc: Bart Van Assche

Hi,

Please help with reviewing these sparse patches.

This patch series updates the Sparse maintainer and mirror documentation,
fixes undefined behavior and memory leaks reported by sanitizers, updates
the LLVM backend for recent LLVM releases, adds support for empty attribute
argument lists, and introduces a GitHub Actions CI workflow:

- Patch 1 updates the maintainer history in Documentation/index.rst from
  the git changelog and points the GitHub mirror link to
  https://github.com/bvanassche/sparse.
- Patches 2-14 fix memory leaks, out-of-bounds array reads, null member
  accesses, inactive union member reads, zero-length VLAs, signed integer
  overflows, and out-of-range bit shifts across ptrlist, bitmask helpers,
  storage management, builtin declarations, c2xml, parsing, preprocessing,
  target size conversions, evaluation, linearization, constant folding, and
  IR simplification so Sparse runs cleanly under ASan, LSan, and UBSan.
- Patches 15-17 and 19 update sparsec and sparse-llvm for modern LLVM
  versions and LeakSanitizer cleanliness. sparsec emits object files
  directly via 'llc -filetype=obj' instead of piping assembly to 'as', and
  sparse-llvm avoids deprecated LLVMConstGEP2() calls on LLVM 15+, uses an
  explicit LLVMContextRef instead of the deprecated global context, and
  disposes allocated arrays, IR builders, and LLVM modules on exit.
- Patch 18 teaches the parser to accept empty attribute argument lists such
  as __attribute__((nonnull())), matching GCC and Clang and avoiding parse
  errors on Linux kernel headers.
- Patch 20 adds a GitHub Actions workflow and CI scripts that build Sparse
  and run 'make check' in both regular mode and ASan + UBSan mode to catch
  regressions, memory errors, and undefined behavior automatically.

If nobody objects I plan to push these changes to the kernel.org sparse git
repository by the end of this week.

Thanks,

Bart.

Bart Van Assche (19):
  doc: Update maintainer and mirror information
  ptrlist: Guard against null list in ptrlist operations
  bits: Guard against out-of-bounds bit shifts in bitmask helpers
  storage: Free hash table entries when freeing storage
  builtin: Bound argument array iteration in declare_builtin()
  c2xml: Use an unsigned shift in examine_modifiers()
  parse: Avoid incrementing rank on invalid long real specifiers
  pre-process: Avoid zero-length VLAs for parameterless macros
  pre-process: Avoid reading token->string on non-string tokens
  target: Avoid signed overflow in bit and byte conversion helpers
  evaluate: Use bitmask helpers in evaluate_ptr_add()
  linearize: Use bits_mask() in linearize_bitfield_insert()
  expand: Avoid undefined shifts and signed overflow in constant folding
  simplify: Avoid undefined shifts and signed overflow in simplification
  sparsec: Emit object files directly with llc -filetype=obj
  llvm: Stop calling LLVMConstGEP2() for string literals
  llvm: Free leaked allocations and LLVM objects
  llvm: Use explicit LLVMContextRef instead of global context
  ci: Add a GitHub Actions workflow and CI scripts

Dmitry Ilvokhin (1):
  parse: Accept an empty attribute argument list

 .github/workflows/build.yml          | 36 +++++++++++
 Documentation/index.rst              | 11 ++--
 bitmap.h                             |  2 +-
 bits.h                               | 12 ++--
 builtin.c                            |  2 +-
 builtin.h                            |  1 -
 c2xml.c                              |  2 +-
 ci/build.sh                          | 22 +++++++
 ci/install.sh                        | 24 +++++++
 ci/test.sh                           |  3 +
 evaluate.c                           |  6 +-
 expand.c                             | 52 ++++++---------
 linearize.c                          |  2 +-
 parse.c                              | 34 ++++++----
 pre-process.c                        | 10 +--
 ptrlist.c                            | 47 ++++++++++----
 ptrlist.h                            | 14 ++--
 simplify.c                           | 53 ++++++++-------
 sparse-llvm.c                        | 96 ++++++++++++++++++----------
 sparsec                              |  2 +-
 storage.c                            | 10 ++-
 target.h                             |  6 +-
 validation/attribute-nonnull-empty.c | 12 ++++
 23 files changed, 310 insertions(+), 149 deletions(-)
 create mode 100644 .github/workflows/build.yml
 create mode 100755 ci/build.sh
 create mode 100755 ci/install.sh
 create mode 100755 ci/test.sh
 create mode 100644 validation/attribute-nonnull-empty.c


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2026-10-21 16:21 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-19 17:56 [PATCH 00/20] Sanitizer fixes, LLVM updates, and CI workflow Bart Van Assche
2026-10-19 17:56 ` [PATCH 01/20] doc: Update maintainer and mirror information Bart Van Assche
2026-10-19 17:56 ` [PATCH 02/20] ptrlist: Guard against null list in ptrlist operations Bart Van Assche
2026-10-21 13:02   ` Dmitry Ilvokhin
2026-10-19 17:56 ` [PATCH 03/20] bits: Guard against out-of-bounds bit shifts in bitmask helpers Bart Van Assche
2026-10-21 13:22   ` Dmitry Ilvokhin
2026-10-19 17:56 ` [PATCH 04/20] storage: Free hash table entries when freeing storage Bart Van Assche
2026-10-21 13:50   ` Dmitry Ilvokhin
2026-10-21 16:21     ` Bart Van Assche
2026-10-19 17:56 ` [PATCH 05/20] builtin: Bound argument array iteration in declare_builtin() Bart Van Assche
2026-10-21 13:54   ` Dmitry Ilvokhin
2026-10-19 17:56 ` [PATCH 06/20] c2xml: Use an unsigned shift in examine_modifiers() Bart Van Assche
2026-10-19 17:56 ` [PATCH 07/20] parse: Avoid incrementing rank on invalid long real specifiers Bart Van Assche
2026-10-19 17:56 ` [PATCH 08/20] pre-process: Avoid zero-length VLAs for parameterless macros Bart Van Assche
2026-10-19 17:56 ` [PATCH 09/20] pre-process: Avoid reading token->string on non-string tokens Bart Van Assche
2026-10-19 17:56 ` [PATCH 10/20] target: Avoid signed overflow in bit and byte conversion helpers Bart Van Assche
2026-10-19 17:56 ` [PATCH 11/20] evaluate: Use bitmask helpers in evaluate_ptr_add() Bart Van Assche
2026-10-19 17:56 ` [PATCH 12/20] linearize: Use bits_mask() in linearize_bitfield_insert() Bart Van Assche
2026-10-19 17:56 ` [PATCH 13/20] expand: Avoid undefined shifts and signed overflow in constant folding Bart Van Assche
2026-10-19 17:56 ` [PATCH 14/20] simplify: Avoid undefined shifts and signed overflow in simplification Bart Van Assche
2026-10-19 17:56 ` [PATCH 15/20] sparsec: Emit object files directly with llc -filetype=obj Bart Van Assche
2026-10-19 17:56 ` [PATCH 16/20] llvm: Stop calling LLVMConstGEP2() for string literals Bart Van Assche
2026-10-19 17:56 ` [PATCH 17/20] llvm: Free leaked allocations and LLVM objects Bart Van Assche
2026-10-19 17:56 ` [PATCH 18/20] parse: Accept an empty attribute argument list Bart Van Assche
2026-10-19 17:56 ` [PATCH 19/20] llvm: Use explicit LLVMContextRef instead of global context Bart Van Assche
2026-10-19 17:56 ` [PATCH 20/20] ci: Add a GitHub Actions workflow and CI scripts Bart Van Assche

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox