Tim Armstrong has submitted this change and it was merged. Change subject: Fix LLVM linker bug ......................................................................
Fix LLVM linker bug The LLVM linker has a bug when linking together modules where the destination module has two or more structurally identical struct types and the source module also has these same struct types. The bug is that all of the struct types in the source get mapped to an arbitrary struct type in the destination. This can cause verification failures when pointer types in call instructions don't match the argument types. E.g. in Impala, TinyIntVal and BooleanVal get mixed up. The LLVM linker has logic to match types by name when linking, but it did not work correctly because of a bug in the hasType() method that incorrectly reports that struct types were not present in the destination module: it looks up a hash table that only contains the first structurally identical type. This patch prevents renaming of a type that has the same name (up to the LLVM-generated numeric suffix) in src and dst. It does this by maintaining a hash table with all struct types in the destination module and checks that instead of the table with structurally distinct types. The fix passes the LLVM test suite. Change-Id: I8aef7f79c8d905b267f5acc3392384b1b333e7d3 --- M buildall.sh A source/llvm/llvm-3.8.0-patches/0001-llvm-link-struct-types.patch 2 files changed, 171 insertions(+), 0 deletions(-) Approvals: Tim Armstrong: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/2656 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8aef7f79c8d905b267f5acc3392384b1b333e7d3 Gerrit-PatchSet: 5 Gerrit-Project: Toolchain Gerrit-Branch: master Gerrit-Owner: Tim Armstrong <[email protected]> Gerrit-Reviewer: Casey Ching <[email protected]> Gerrit-Reviewer: Michael Ho Gerrit-Reviewer: Michael Ho <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]>
