Bug#877359: clang: precompiled headers are not reproducible

Rebecca N. Palmer rebecca_palmer at zoho.com
Sat Oct 7 09:34:37 UTC 2017


Control: tags -1 upstream patch

Running the affected files through llvm-bcanalyzer says the difference 
is in the ordering of OPENCL_EXTENSION_TYPES, and this makes sense as 
these are stored in a hash map (i.e. unordered):
http://sources.debian.net/src/llvm-toolchain-5.0/1:5.0%7E%2Brc2-1/clang/lib/Serialization/ASTWriter.cpp/?hl=4156#L4151
http://sources.debian.net/src/llvm-toolchain-5.0/1:5.0%7E%2Brc2-1/clang/include/clang/Sema/Sema.h/?hl=8408#L8402

This suggests the attached patch, but this has *not* been tested as llvm 
is currently BD-Uninstallable.

It also implies that the affected versions are clang 4.0 and later 
(since https://reviews.llvm.org/D21698 ), including current upstream, 
but I haven't actually tested that.  Hence, this particular issue 
probably *isn't* the reason *current* beignet is unreproducible, but 
will affect it after the planned llvm 3.x removal.

(Not related to this bug, but it looks weird that static_cast<unsigned> 
is on I.first in WriteOpenCLExtensionType and on I.second in 
WriteOpenCLExtensionDecl (and has been since this feature was first 
added) - might be worth asking upstream why?)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reproducible-pch.diff
Type: text/x-patch
Size: 1544 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-llvm-team/attachments/20171007/0628e9a7/attachment.bin>


More information about the Pkg-llvm-team mailing list