[PATCH] D70421: Initialize global vectors with invalid members to catch uninitialization errors

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 18 23:35:14 PST 2019


MaskRay added a comment.

We have other non-vector global variables that cannot be checked this way: SyntheticSections.h `InStruct in`, OutputSections.h `Out::*`, LinkerScript.h `script`, Config.h `config`, Relocations.cpp `undefs`, etc. My feeling is that if we want to detect all potential problems, we can hack a ld.lld server, let ld.lld commands invoked by lit send linking requests to the server. Many tests run several ld.lld commands. This can probably catch most problems. The idea is simple but it may not be worthwhile implemented in the code base, though.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70421/new/

https://reviews.llvm.org/D70421





More information about the llvm-commits mailing list