September 13, 2023
https://issues.dlang.org/show_bug.cgi?id=24144

          Issue ID: 24144
           Summary: [REG2.105] Silent file name index overflow
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody@puremagic.com
          Reporter: kinke@gmx.net

Since D v2.105, the compiler's `Loc` struct only supports up to 64K file names.
At work, we hit a wild issue while compiling a (private) dub package (about 50
.d modules) - the overflow was so bad that it affected the .a library output
file name. Instead of generating some `.a` file specified with `-of`, the
compiler emitted the library as file
`~/.dub/packages/symmetry_thrift_d/1.0.8/symmetry_thrift_d/src/thrift/internal/codegen.d-mixin-73`,
without any error or warning (there's an assertion in
https://github.com/dlang/dmd/blob/v2.105.1/compiler/src/dmd/location.d#L118,
but not part of release builds...). The linker command then later failed.

So I'm guessing lots of mixins lead to lots of virtual file names, so that exceeding 64K file names isn't that difficult.

--