Bug 4392 - fileinfo outofrange on x86
Summary: fileinfo outofrange on x86
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: master
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Paolo Molaro
URL:
Depends on:
Blocks:
 
Reported: 2012-04-11 10:01 UTC by Piotr Wysocki
Modified: 2015-03-26 08:28 UTC (History)
4 users (show)

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

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 Piotr Wysocki 2012-04-11 10:01:32 UTC
x86 (x64 unaffected)

Assuming examples.desktop is a regular file:

$ cat test.cs
var fi = new System.IO.FileInfo("examples.desktop");
Console.WriteLine(fi);
Console.WriteLine(fi.Exists);
Console.WriteLine(fi.LastWriteTime);
Console.WriteLine(fi.LastAccessTime);

$ /opt/mono-2.10.9/bin/csharp test.cs
examples.desktop
True
4/11/2012 12:29:06 PM
4/11/2012 12:29:06 PM

$ /opt/mono-2.11/bin/csharp test.cs
examples.desktop
True
1/1/1601 1:00:03 AM
System.ArgumentOutOfRangeException: < 0
Parameter name: fileTime
  at System.DateTime.FromFileTime (Int64 fileTime) [0x00000] in <filename unknown>:0
  at System.IO.FileSystemInfo.get_LastAccessTime () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) System.IO.FileSystemInfo:get_LastAccessTime ()
  at <InteractiveExpressionClass>.Host (System.Object& $retval) [0x00000] in <filename unknown>:0
  at Mono.CSharp.Evaluator.Evaluate (System.String input, System.Object& result, System.Boolean& result_set) [0x00000] in <filename unknown>:0
  at Mono.CSharpShell.Evaluate (System.String input) [0x00000] in <filename unknown>:0

mono 2.11 compiled from tarball (http://download.mono-project.com/sources/mono/   [ ]	mono-2.11.0.tar.bz2	22-Mar-2012 22:51 	31M)
Comment 1 Miguel de Icaza [MSFT] 2012-04-13 17:06:15 UTC
Paolo, can you investigate this?
Comment 2 Piotr Wysocki 2015-03-26 08:28:06 UTC
It's working on Mono 3.2.8 (Debian 3.2.8+dfsg-4ubuntu1.1), I don't care anymore.