Bug 11862 - Mono changes its behavior in the presence or absence of Object.GetType calling. (2)
Summary: Mono changes its behavior in the presence or absence of Object.GetType callin...
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: Reflection ()
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-04-19 08:56 UTC by Hiroyuki Iwatsuki
Modified: 2013-04-19 14:38 UTC (History)
2 users (show)

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


Attachments
test program (1012 bytes, text/plain)
2013-04-19 08:56 UTC, Hiroyuki Iwatsuki
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 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:
Status:
RESOLVED FIXED

Description Hiroyuki Iwatsuki 2013-04-19 08:56:11 UTC
Created attachment 3835 [details]
test program

This is a another problem like #11750.

The result of test.cs is:

value(-64) <     -1 => False
value(-64) <  -0x20 => False
value(-64) <  -0x80 => False

This is not correct on some platforms.

However, uncomment "value.GetType();" in Tmp.Packer.PackSByte(),
or comment out "packer.PackObject(true);" in Tmp.Packer.Main(),
then this program works fine.

value(-64) <     -1 => True
value(-64) <  -0x20 => True
value(-64) <  -0x80 => False

Platforms that works fine are:

csc.exe in Visual Studio 2012 Express on Windows Desktop on Windows 7 SP1

    Microsoft (R) Visual C# Compiler Version 4.0.30319.17929
    for Microsoft (R) .NET Framework 4.5
    Copyright (C) Microsoft Corporation. All rights reserved.

Mono 3.0.6 (Official release binary for Mac OS X) on Mac OS X 10.7.5

    Mono JIT compiler version 3.0.6 (master/20e40c4 Wed Feb 27 10:15:23 EST 2013)
    Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
            TLS:           normal
            SIGSEGV:       altstack
            Notification:  kqueue
            Architecture:  x86
            Disabled:      none
            Misc:          softdebug 
            LLVM:          yes(3.1svn-mono)
            GC:            Included Boehm (with typed GC)

ideone.com (mono-2.8)

    See http://ideone.com/SU6Ma0 for details.

Platforms that not work fine are:

Mono 3.0.3 from FreeBSD ports lang/mono on FreeBSD 9.1-STABLE

    Mono JIT compiler version 3.0.3 (tarball Fri Apr 19 16:54:49 JST 2013)
    Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
            TLS:           __thread
            SIGSEGV:       altstack
            Notification:  kqueue
            Architecture:  amd64
            Disabled:      none
            Misc:          softdebug
            LLVM:          supported, not enabled.
            GC:            Included Boehm (with typed GC and Parallel Mark)

Mono 3.0.6 from GitHub(tag mono-3.0.6) on FreeBSD 9.1-STABLE

    Mono JIT compiler version 3.0.6 (mono-3.0.6/20e40c4 2013年 4月19日 金曜日 20時21分40秒 JST)
    Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
            TLS:           __thread
            SIGSEGV:       normal
            Notification:  kqueue
            Architecture:  amd64
            Disabled:      none
            Misc:          softdebug
            LLVM:          supported, not enabled.
            GC:            Included Boehm (with typed GC and Parallel Mark)

Mono 3.0.6 from GitHub(tag mono-3.0.6) on Mac OS X 10.7.5

    Mono JIT compiler version 3.0.6 (mono-3.0.6/20e40c4 2013年 4月19日 金曜日 20時57分05秒 JST)
    Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
            TLS:           normal
            SIGSEGV:       altstack
            Notification:  kqueue
            Architecture:  amd64
            Disabled:      none
            Misc:          softdebug 
            LLVM:          supported, not enabled.
            GC:            Included Boehm (with typed GC)

Mono 3.0.10 from GitHub(master) on FreeBSD 9.1-STABLE

    Mono JIT compiler version 3.0.10 (master/1c94cd3 2013年 4月19日 金曜日 19時24分22秒 JST)
    Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
            TLS:           __thread
            SIGSEGV:       normal
            Notification:  kqueue
            Architecture:  amd64
            Disabled:      none
            Misc:          softdebug
            LLVM:          supported, not enabled.
            GC:            Included Boehm (with typed GC and Parallel Mark)
Comment 1 Zoltan Varga 2013-04-19 14:38:17 UTC
Fixed in master/2.10.