[Issue 24144] New: [REG2.105] Silent file name index overflow

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 13 12:27:07 UTC 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 at puremagic.com
          Reporter: kinke at 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.

--


More information about the Digitalmars-d-bugs mailing list