[PATCH] D43834: Fix use after free in PDB linker.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 17:37:01 PST 2018


For the dynamic crt, there is no need for link time pdbs, the debugger will
just download them from the symbol server at Debug time
On Tue, Feb 27, 2018 at 4:52 PM Shoaib Meenai via Phabricator <
reviews at reviews.llvm.org> wrote:

> smeenai added a comment.
>
> In https://reviews.llvm.org/D43834#1021427, @zturner wrote:
>
> > In https://reviews.llvm.org/D43834#1021379, @smeenai wrote:
> >
> > > To clarify, this is only an issue when using type server PDBs, right?
> >
> >
> > Yes
> >
> > > In other words, if we're purely cross-compiling using clang and
> lld-link, we wouldn't run into this, since clang-cl doesn't use type server
> PDBs (in other words, it does `/Z7` instead of `/Zi`)?
> >
> > No.  clang-cl doesn't *generate* type server PDBs, so its' true that all
> debug info *generated by clang-cl* will not experience this.  But you will
> need to link against the CRT, and that will pull in some variant of
> `libcmt.pdb`, and that is where you will hit this bug.
>
>
> We're linking against the dynamic CRT, and my VS 2017 install doesn't
> include PDBs for the dynamic CRT libraries (e.g. I see libcmt.pdb, but not
> anything for msvcrt). We were also not copying over those PDBs to our
> cross-compilation sysroot anyway, though that was just an oversight on our
> part and not anything intentional (but if they don't have PDBs for the
> dynamic CRT libraries, it's irrelevant for us anyway).
>
>
> https://reviews.llvm.org/D43834
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180228/90f6c18c/attachment.html>


More information about the llvm-commits mailing list