Bug 36300 - JIT intrinsics do not perform explicit null checks
Summary: JIT intrinsics do not perform explicit null checks
Status: NEW
Alias: None
Product: Runtime
Classification: Mono
Component: JIT (show other bugs)
Version: unspecified
Hardware: Other Other
: --- normal
Target Milestone: ---
Assignee: Zoltan Varga
Depends on:
Reported: 2015-11-27 01:55 UTC by Alex Rønne Petersen
Modified: 2015-12-17 08:33 UTC (History)
3 users (show)

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


Description Alex Rønne Petersen 2015-11-27 01:55:52 UTC
Certain JIT intrinsics like Interlocked.Exchange<T> () and Interlocked.CompareExchange<T> () do not emit explicit null checks when this debug option is enabled. This means that on targets that can't turn signals into NREs, these intrinsics won't work correctly in the exceptional case.
Comment 1 Zoltan Varga 2015-12-17 07:55:22 UTC
Those methods take byref arguments, so its hard for them to be null, at least in c# code.
Comment 2 Alex Rønne Petersen 2015-12-17 08:33:02 UTC
Nonetheless, it seems we have to do the check for MS.NET compatibility reasons. See this PR: https://github.com/mono/mono/pull/2268

Note You need to log in before you can comment on or make changes to this bug.