[all-commits] [llvm/llvm-project] 79cd6c: [dfsan] Add test case for sscanf (#94700)

Thurston Dang via All-commits all-commits at lists.llvm.org
Thu Jun 6 17:48:59 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 79cd6c3d01c6c69ca870418a3c602dbd1bef29e4
      https://github.com/llvm/llvm-project/commit/79cd6c3d01c6c69ca870418a3c602dbd1bef29e4
  Author: Thurston Dang <thurston at google.com>
  Date:   2024-06-06 (Thu, 06 Jun 2024)

  Changed paths:
    A compiler-rt/test/dfsan/sscanf.c

  Log Message:
  -----------
  [dfsan] Add test case for sscanf (#94700)

This test case shows a limitation of DFSan's sscanf implementation
(introduced in https://reviews.llvm.org/D153775): it simply ignores
ordinary characters in the format string, instead of actually comparing
them against the input. This may change the semantics of instrumented
programs.

Importantly, this also means that DFSan's release_shadow_space.c test,
which relies on sscanf to scrape the RSS from /proc/maps output, will
incorrectly match lines that don't contain RSS information. As a result,
it adding together numbers from irrelevant output (e.g., base
addresses), resulting in test flakiness
(https://github.com/llvm/llvm-project/issues/91287).



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