Skip to content
Snippets Groups Projects
  • Jordan Rose's avatar
    601e611a
    [analyzer] Warn when passing pointers to const but uninitialized memory. · 601e611a
    Jordan Rose authored
    Passing a pointer to an uninitialized memory buffer is normally okay,
    but if the function is declared to take a pointer-to-const then it's
    very unlikely it will be modifying the buffer. In this case the analyzer
    should warn that there will likely be a read of uninitialized memory.
    
    This doesn't check all elements of an array, only the first one.
    It also doesn't yet check Objective-C methods, only C functions and
    C++ methods.
    
    This is controlled by a new check: alpha.core.CallAndMessageUnInitRefArg.
    
    Patch by Per Viberg!
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203822 91177308-0d34-0410-b5e6-96231b3b80d8
    601e611a
    History
    [analyzer] Warn when passing pointers to const but uninitialized memory.
    Jordan Rose authored
    Passing a pointer to an uninitialized memory buffer is normally okay,
    but if the function is declared to take a pointer-to-const then it's
    very unlikely it will be modifying the buffer. In this case the analyzer
    should warn that there will likely be a read of uninitialized memory.
    
    This doesn't check all elements of an array, only the first one.
    It also doesn't yet check Objective-C methods, only C functions and
    C++ methods.
    
    This is controlled by a new check: alpha.core.CallAndMessageUnInitRefArg.
    
    Patch by Per Viberg!
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203822 91177308-0d34-0410-b5e6-96231b3b80d8
Code owners
Assign users and groups as approvers for specific file changes. Learn more.