Jim Apple has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/11682


Change subject: IMPALA-5031: Undefined uninitialized bool read
......................................................................

IMPALA-5031: Undefined uninitialized bool read

This fixes a bug in cpp-mustache that was already fixed in its
upstream repository
(https://github.com/henryr/cpp-mustache/commit/7efdb810e). Without
this fix, the code reads something like:

    bool foo;
    MaybeSetValue(&foo);
    ReadValue(foo);

Because MaybeSetValue might not set the vale of foo, foo might be
uninitialized in the call ReadValue(foo), which is undefined behavior
at the call site when foo is read. The standard says, in
[basic.fundamental]:

    Using a bool value in ways described by this International
    Standard as "undefined," such as by examining the value of an
    uninitialized automatic object, might cause it to behave as if it
    is neither true nor false.

Change-Id: I7b32a5dd3afc3f2d847be37766aa0f7e53af32a3
---
M be/src/thirdparty/mustache/mustache.cc
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/82/11682/1
--
To view, visit http://gerrit.cloudera.org:8080/11682
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7b32a5dd3afc3f2d847be37766aa0f7e53af32a3
Gerrit-Change-Number: 11682
Gerrit-PatchSet: 1
Gerrit-Owner: Jim Apple <[email protected]>

Reply via email to