impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <>
Subject [Toolchain-CR] Fix LLVM linker bug
Date Tue, 05 Apr 2016 21:49:19 GMT
Hello Casey Ching,

I'd like you to reexamine a change.  Please visit

to look at the new patch set (#3).

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.

The fix is to maintain a hash table with all struct types in the
destination module and check that instead of the table with structurally
istinct types. The fix passes the LLVM test suite.

Change-Id: I8aef7f79c8d905b267f5acc3392384b1b333e7d3
M source/llvm/
A source/llvm/llvm-3.8.0-patches/0001-llvm-link-struct-types.patch
3 files changed, 151 insertions(+), 1 deletion(-)

  git pull ssh:// refs/changes/56/2656/3
To view, visit
To unsubscribe, visit

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8aef7f79c8d905b267f5acc3392384b1b333e7d3
Gerrit-PatchSet: 3
Gerrit-Project: Toolchain
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <>
Gerrit-Reviewer: Casey Ching <>
Gerrit-Reviewer: Michael Ho
Gerrit-Reviewer: Michael Ho <>
Gerrit-Reviewer: Tim Armstrong <>

View raw message