[all-commits] [llvm/llvm-project] 54b022: [lldb] Fix nondeterminism in TestCppBitfields

Pavel Labath via All-commits all-commits at lists.llvm.org
Tue Jan 28 05:25:14 PST 2020


  Branch: refs/heads/release/10.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 54b022d344412fc9f1dfe37ee05de934a01e1ea4
      https://github.com/llvm/llvm-project/commit/54b022d344412fc9f1dfe37ee05de934a01e1ea4
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2020-01-28 (Tue, 28 Jan 2020)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/TestCppBitfields.py
    M lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/main.cpp

  Log Message:
  -----------
  [lldb] Fix nondeterminism in TestCppBitfields

The test was printing a char[3] variable without a terminating nul. The
memory after that variable (an unnamed bitfield) was not initialized. If
the memory happened to be nonzero, the summary provider for the variable
would run off into the next field.

This is probably not the right behavior (it should stop at the end of
the array), but this is not the purpose of this test. I have filed
pr44649 for this bug, and fixed the test to not depend on this behavior.

(cherry picked from commit 77cedb0cdb8623ff9eb22dbf3b9302ee4d9f8a20)




More information about the All-commits mailing list