D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 18245 - Segfault on std.math.nearbyint
Summary: Segfault on std.math.nearbyint
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86_64 Windows
: P1 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-16 21:59 UTC by Răzvan Ștefănescu
Modified: 2020-09-12 05:20 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Răzvan Ștefănescu 2018-01-16 21:59:06 UTC
If there is no alternative, make function unavailable on Windows 64 bit instead of using a 0 assertion.

real nearbyint(real x) @trusted nothrow @nogc
{
    version (CRuntime_Microsoft)
    {
        assert(0);      // not implemented in C library
    }
    else
        return core.stdc.math.nearbyintl(x);
}
Comment 1 Nathan S. 2020-09-12 05:20:53 UTC
Was fixed by https://github.com/dlang/phobos/pull/7360