This is an archive of the discontinued LLVM Phabricator instance.

[lld-link] emit an error when writing a PDB > 4 GiB
ClosedPublic

Authored by thakis on Mar 17 2021, 8:59 AM.

Details

Summary

Maybe there's a way to make them work, but until I've investigated
if tools can consume large PDBs, erroring out is better than slowly
and silently consuming all available ram due to internal invariants
being violated.

(Patch to make writing larger files work at
https://bugs.chromium.org/p/chromium/issues/detail?id=1179085#c25
but I haven't had time to check if windbg & co can consume these
large PDBs. llvm-pdbutil can't, but we can fix that one at least :) )

Diff Detail

Event Timeline

thakis created this revision.Mar 17 2021, 8:59 AM
thakis requested review of this revision.Mar 17 2021, 8:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 17 2021, 8:59 AM
rnk accepted this revision.Mar 17 2021, 9:45 AM

lgtm

I considered and rejected the idea of adding a test for this.

This revision is now accepted and ready to land.Mar 17 2021, 9:45 AM
In D98788#2632073, @rnk wrote:

lgtm

Thanks!

I considered and rejected the idea of adding a test for this.

Me too :)

This revision was automatically updated to reflect the committed changes.
akrieger added a subscriber: akrieger.EditedJul 30 2021, 12:16 PM

For the record, since this commit added the relevant comment, it does not appear that either VS or windbg can successfully load the resulting pdbs even if we patched lld to support emitting them.

DBGHELP: ........ DIA E_PDB_FILE_SYSTEM error from 875
DBGHELP: Failed copying the file 'O:\<redacted>\Codename.pdb' to the cache
DBGHELP: ........ DIA E_PDB_FILE_SYSTEM error from 953
DBGHELP: O:\<redacted>\Codename.pdb - drive not ready
...
************* Symbol Loading Error Summary **************
Module name            Error
Codename               - Unknown error: 0x400.

Bruce Dawson opened https://developercommunity.visualstudio.com/t/pdb-limit-of-4-gib-is-likely-to-be-a-problem-in-a/904784 last year and it seems to be an acknowledged issue that is not yet resolved.