Skip to content

Debug builds of files with huge numbers of methods multiple classes with <64K methods but total > 64K fails. release builds succees #16399

@KevinRansom

Description

@KevinRansom

Code similar to:

namespace Hello

[<NoComparison; NoEquality>]
type Type1() =
    static member Type1Method00001() = ()
    static member Type1Method00002() = ()
    ... including all methods from 00003 to  65518
    static member Type1Method65519() = ()
    static member Type1Method65520() = ()

[<NoComparison; NoEquality>]
type Type2() =
    static member Type2Method00001() = ()
    static member Type2Method00002() = ()
    ... including all methods from 00003 to  65518
    static member Type2Method65519() = ()
    static member Type2Method65520() = ()

module Main =
  [<EntryPoint>]
  let main _ =
    let _t1 = new Type1()
    Type1.Type1Method00001() 
    Type1.Type1Method30000() 
    Type1.Type1Method60000() 
    Type1.Type1Method65000() 
    let _t2 = new Type2()
    Type2.Type2Method00001() 
    Type2.Type2Method30000() 
    Type2.Type2Method60000() 
    Type2.Type2Method65000() 
    printfn "Fin"
    0

Release builds succeed, debug builds fail with:

C:\Users\kevinr\source\repos\ConsoleApp48\MultipleBigClasses>dotnet run
Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at Hello.Main.main(System.String[])

Metadata

Metadata

Assignees

Labels

Area-Debugstepping, debug points, stacks and moreBugImpact-High(Internal MS Team use only) Describes an issue with extreme impact on existing code.Tracking-External

Type

No type
No fields configured for issues without a type.

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions