Bug 26900 - Xamarin.iOS incorrectly copies the structs when targed ARM64
Summary: Xamarin.iOS incorrectly copies the structs when targed ARM64
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 8.6.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: 8.6.x (services rel)
Assignee: Zoltan Varga
URL:
Depends on:
Blocks:
 
Reported: 2015-02-10 04:15 UTC by Prashant Cholachagudda
Modified: 2015-02-13 06:42 UTC (History)
6 users (show)

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


Attachments
Test case (11.86 KB, application/zip)
2015-02-10 04:15 UTC, Prashant Cholachagudda
Details


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 Developer Community or GitHub 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:
Status:
VERIFIED FIXED

Description Prashant Cholachagudda 2015-02-10 04:15:56 UTC
Created attachment 9740 [details]
Test case

Attached is a project, that when built with Debug / ARM64 and run on an iOS 64 bit device, will print two different
values, the correct one at the time the structure was created and some garbage or zero value, when it was returned by a property accessor to a
caller. 

The code in question start at AppDelegate.cs line 20+.

The debug output here is:

	Feb 10 14:40:50 Prashants-iPhone ARM64Test[693] <Warning>: t.P.Y: 3
	Feb 10 14:40:50 Prashants-iPhone ARM64Test[693] <Warning>: t.P.Y: 1.401298E-45
Comment 1 Naqeeb 2015-02-10 06:42:07 UTC
I have checked this issue and able to reproduce successfully. I have followed steps below.

1. Download Test case and open in XS.
2. Run the app on iOS 64 bit device and got same behaviour given in bug description. 

Please refer same as screencast : http://www.screencast.com/t/DyyV6Wi1
Ide log : https://gist.github.com/Udham1/2ab71e75261e8f9e4287
Application output : https://gist.github.com/Udham1/837dad3d038205e53dbf

Environment Info :

=== Xamarin Studio ===

Version 5.7.1 (build 17)
Installation UUID: ce927b2a-2c07-44c5-b186-09cfdafba6dc
Runtime:
	Mono 3.12.0 ((detached/a813491)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000068

=== Apple Developer Tools ===

Xcode 6.2 (6770)
Build 6C121

=== Xamarin.iOS ===

Version: 8.6.1.24 (Business Edition)
Hash: 1ee873c
Branch: 
Build date: 2015-01-31 17:42:21-0500

=== Build Information ===

Release ID: 507010017
Git revision: 0bc7d3550b6b088ac25b08dcf7bbe73bcc8658b3
Build date: 2015-02-03 19:43:29-05
Xamarin addins: f7b7d34419c9ec24501bfa7c658e80a6305613e0

=== Operating System ===

Mac OS X 10.9.5
Darwin Xamarin76s-Mac-mini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 2 Rolf Bjarne Kvinge [MSFT] 2015-02-10 07:18:26 UTC
Zoltan, this looks like an ARM64 bug, and I can still reproduce with maccore/master.
Comment 3 Zoltan Varga 2015-02-10 23:06:31 UTC
Fixed in mono-extensions 8fdc3b6a197f59dc12adfc3dd765294efc0416ff.
This should be backported to the service release.
Comment 4 Rolf Bjarne Kvinge [MSFT] 2015-02-11 03:54:06 UTC
mono-extensions/macios-merge: 51af2048336c4c8c385a7a7d40e5a22699faed7c
maccore/master: c60f6087da95f3b359913c8b7cc64928a21e8907
Comment 5 Udham Singh 2015-02-12 10:30:15 UTC
I have checked this issue with Xamarin.iOS 8.9.1.126 (Master) and this issue has been fixed with Xamarin.iOS 8.9.1.126 (Master). 

Also I have checked the same with Xamarin.iOS 8.6.2.8 and still observing the reported behaviour with Xamarin.iOS 8.6.2.8

Screencast : http://www.screencast.com/t/QCOjZTovr

Environment Info :

Mac OS X 10.9.5
Xamarin Studio 5.7.1 (build 17)
Mono 3.12.0 ((detached/a813491)
GTK+ 2.24.23 (Raleigh theme)
Xcode 6.1.1 (6611)
Xamarin.iOS 8.9.1.126 (Business Edition)
Comment 6 Sebastien Pouliot 2015-02-12 15:05:26 UTC
Backport for SR2 in 1c37c1745eda3706a4a013c8885d06d8f5ec764e
Comment 7 Udham Singh 2015-02-13 06:42:36 UTC
I have checked this issue with Xamarin.iOS 8.6.2.15 and now this is working fine. Hence closing this issue.

Screencast : http://www.screencast.com/t/BO5lbIOc

Environment Info :

Mac OS X 10.9.5
Xamarin Studio 5.7.1 (build 17)
Mono 3.12.0 ((detached/a813491)
GTK+ 2.24.23 (Raleigh theme)
Xcode 6.1.1 (6611)
Xamarin.iOS 8.6.2.15 (Business Edition)