Bug 16529 - F# "unativeint" conversion from Double to UIntPtr generates "conv.u" instruction which is not implemented by Mono
Summary: F# "unativeint" conversion from Double to UIntPtr generates "conv.u" instruct...
Alias: None
Product: Runtime
Classification: Mono
Component: JIT ()
Version: 3.2.x
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2013-11-30 10:50 UTC by donsyme
Modified: 2013-12-01 07:03 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description donsyme 2013-11-30 10:50:53 UTC
F# includes a "unativeint" conversion from Double to UIntPtr (where UIntPtr is being used as a Native-sized unsigned integer type)

This generates "conv.u" instruction which is not implemented by Mono

F# Repro (using fsharpi)
let x = unativeint 0.0 

Expected: works ok
Actual: Abort

Native stacktrace:

        mono() [0x4ad6a1]
        /lib/x86_64-linux-gnu/libpthread.so.0(+0xf030) [0x7f619510b030]
        /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7f6194da4475]
        /lib/x86_64-linux-gnu/libc.so.6(abort+0x180) [0x7f6194da76f0]
        mono() [0x62bcbd]
        mono() [0x62bdf6]
        mono() [0x4eac07]
        mono() [0x42391e]
Comment 1 Zoltan Varga 2013-12-01 07:03:43 UTC
Fixed in master 073752949f4e7846f3a9de365660077d44e22082.