Go to file
Sebastian Pop 753d43f974 fix insertion of values in BBMap
In GDB when "step" through generateScalarLoad and "finish" the call, the
returned value is non NULL, however when printing the value contained in
BBMap[Load] after this stmt:

  BBMap[Load] = generateScalarLoad(...);

the value in BBMap[Load] is NULL, and the BBMap.count(Load) is 1.

The only intuitive idea that I have to explain this behavior is that we are
playing with the undefined behavior of eval order of the params for the function
standing for "BBMap[Load] = generateScalarLoad()". "BBMap[Load] = " may be
executed before generateScalarLoad is called.

Here are some other possible explanations from Will Dietz <w@wdtz.org>:

The error is likely due to BBMap[Load] being evaluated first (creating
a {Load -> uninitialized } entry in the DenseMap), then
generateScalarLoad eventually accesses the same element and finds it
to be NULL (DenseMap[Old])..  Offhand I'm not sure if this is
guaranteed to be NULL or if it's uninitialized and happens to be NULL.

The same issue can also go wrong in an even worse way: the second
DenseMap access can trigger a rehash and *invalidate* the an earlier
evaluated expression (for example LHS of the assignment), leading to a
crash when performing the assignment store.

llvm-svn: 182655
2013-05-24 17:16:02 +00:00
clang Fix printing CXXTemporaryObjectExpr with default args. 2013-05-24 16:11:44 +00:00
clang-tools-extra Unbreak the build. 2013-05-17 16:26:21 +00:00
compiler-rt [lsan] Minor adjustments to LSan messages. 2013-05-24 15:36:30 +00:00
debuginfo-tests Remove IR scenario tests. 2013-03-15 20:52:10 +00:00
libclc Update the copyright coredits -- Happy new year 2013! 2013-01-01 10:00:19 +00:00
libcxx Neglected to remove a debugging comment from last commit. 2013-05-21 21:19:35 +00:00
libcxxabi Add capability to demangle invocation functions for ObjC blocks. 2013-04-10 19:44:03 +00:00
lld [lld][LayoutPass] Add comment on _followOn{Nexts,Roots}. 2013-05-23 17:43:39 +00:00
lldb Added a parameter for relocation info to keep lldb in step with llvm due to r182625, 2013-05-24 15:55:54 +00:00
llvm Do not reserve space for the ColdEdges and NormalEdges vectors. 2013-05-24 17:00:22 +00:00
polly fix insertion of values in BBMap 2013-05-24 17:16:02 +00:00