[Mono-bugs] [Bug 624299] New: assertion failed when using IEnumerable in F# Interactive

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jul 21 09:32:26 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=624299

http://bugzilla.novell.com/show_bug.cgi?id=624299#c0


           Summary: assertion failed when using IEnumerable in F#
                    Interactive
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.6.x
          Platform: x86-64
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: laurentlb at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=377475)
 --> (http://bugzilla.novell.com/attachment.cgi?id=377475)
assert failed stacktrace

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3

The following example, which works on MS .NET, generates an assertion failed
error on Mono.

ubuntu% mono -V
Mono JIT compiler version 2.6.4 (tarball Thu Jul  1 18:26:09 BST 2010)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
    TLS:           __thread
    GC:            Included Boehm (with typed GC and Parallel Mark)
    SIGSEGV:       altstack
    Notifications: epoll
    Architecture:  amd64
    Disabled:      none
ubuntu% uname -a
Linux ubuntu 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 19:31:57 UTC 2010
x86_64 GNU/Linux


Reproducible: Always

Steps to Reproduce:
Get F# from Microsoft website (fsharp.net).

ubuntu% cat repro.fsx
let readValues format =
    seq { for node in [ 1 ] do yield! [ format "9" ] }

// If you comment next line, bug disappears
let x = readValues id |> Seq.length

let y = readValues float |> Seq.length

ubuntu% mono /usr/lib/fsharp/fsi.exe repro.fsx
Actual Results:  
ERROR:mini-generic-sharing.c:148:mini_get_basic_type_from_generic: assertion
failed: (gsctx)

Full stacktrace attached.

Expected Results:  
No error expected, code shouldn't print anything.

If you change the second line of code with:
    seq { for node in [ 1 ] do yield! [ 1, format "9" ] }

Then,you get an (unexpected):

System.TypeLoadException: A type load exception has occurred.
  at FSI_0001+readValues at 2[System.Double].GetFreshEnumerator () [0x00000] in
<filename unknown>:0 


If you compile the code with F# compiler (fsc.exe), then it works. Bug might be
related to dynamic code generation.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list