[all-commits] [llvm/llvm-project] 2cf4b4: [AVR] Fix reads of uninitialized variables from co...

Dylan McKay via All-commits all-commits at lists.llvm.org
Thu Mar 12 04:58:11 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2cf4b4de0c7b290bc52843d3aecc23ff496a8729
      https://github.com/llvm/llvm-project/commit/2cf4b4de0c7b290bc52843d3aecc23ff496a8729
  Author: Dylan McKay <me at dylanmckay.io>
  Date:   2020-03-13 (Fri, 13 Mar 2020)

  Changed paths:
    M llvm/lib/Target/AVR/AVRSubtarget.cpp
    M llvm/lib/Target/AVR/AVRSubtarget.h

  Log Message:
  -----------
  [AVR] Fix reads of uninitialized variables from constructor of AVRSubtarget

The initialization order was not correct. These bugs were discovered by
valgrind. They appear to work fine in practice but this patch should
unblock switching the AVR backend on by default as now a standard AVR
llc invocation runs without memory errors.

The AVRISelLowering constructor would run before the subtarget boolean
fields were initialized to false. Now, the initialization order is
correct.




More information about the All-commits mailing list