Bug 21685

Summary: Reading bool pointers only takes into account the first bit
Product: [Mono] Compilers Reporter: Rolf Bjarne Kvinge [MSFT] <rolf>
Component: C#Assignee: Marek Safar <masafa>
Status: RESOLVED FIXED    
Severity: normal CC: masafa, mono-bugs+mono, mono-bugs+runtime
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: test.cs

Description Rolf Bjarne Kvinge [MSFT] 2014-07-30 07:21:32 UTC
Created attachment 7531 [details]
test.cs

Run attached test case.

The output in mono will be intermittent True/False, with True for every odd number:

#0 = False
#1 = True
#2 = False
#3 = True

The output for MS is False for #0, and True for the rest:

#0 = False
#1 = True
#2 = True
#3 = True

> mono --version
Mono JIT compiler version 3.6.1 ((no/9d8be3d Sun Jul 27 20:49:44 EDT 2014)

I also tried with the tip of mono-3.6.0-branch and mono-3.4.0-branch, and both fail the test case.
Comment 1 Marek Safar 2014-07-31 12:41:34 UTC
Fixed in master and 3.8 branch