[Mono-bugs] [Bug 353182] New: Crash when refer to Dictionary after load a file to buffer
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Jan 11 03:30:58 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=353182
Summary: Crash when refer to Dictionary after load a file to
buffer
Product: Mono: Class Libraries
Version: 1.2.6
Platform: Sparc
OS/Version: Solaris 8
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: Yasuaki.Hasegawa at fujixerox.co.jp
QAContact: mono-bugs at lists.ximian.com
CC: Yasuaki.Hasegawa at fujixerox.co.jp
Found By: Customer
Description of Problem:
Steps to reproduce the problem:
1. create a C# source file with following contents.
bash-2.03$ cat test4.cs
using System;
using System.Collections.Generic;
using System.IO;
public class Example
{
public static void Main(string[] args) {
// following statement will generate an nonsignificant
// warning: "The variable data is assigned but its value
// is never used"
byte[] data = File.ReadAllBytes(@"/etc/passwd"); // any
readable file
Dictionary<char, byte> _widths = new Dictionary<char, byte>();
_widths[(char)0] = (byte)0;
}
}
2. compile it and run.
bash-2.03$ /opt/csw/bin/gmcs test4.cs
test4.cs(12,24): warning CS0219: The variable `data' is assigned but its value
is never used
Compilation succeeded - 1 warning(s)
bash-2.03$ /opt/csw/bin/mono test4.exe
Actual Results:
The application crashed with the following stack trace:
test4.cs(12,24): warning CS0219: The variable `data' is assigned but its value
is never used
Compilation succeeded - 1 warning(s)
bash-2.03$ /opt/csw/bin/mono test4.exe
Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object
at
System.Collections.Generic.GenericEqualityComparer`1[System.Char].GetHashCode
(Char ) [0x00000]
at System.Collections.Generic.Dictionary`2[System.Char,System.Byte].set_Item
(Char , Byte ) [0x00000]
at Example.Main (System.String[] args) [0x00000]
Expected Results:
The program shouldn't crash.
How often does this happen?
infallible
Additional Information:
(1) Build Date & Platform
bash-2.03$ uname -a
SunOS tornado 5.8 Generic_117350-51 sun4u sparc SUNW,Sun-Blade-1000
bash-2.03$ /opt/csw/bin/gmcs --version
Mono C# compiler version 1.2.6.0
bash-2.03$ /opt/csw/bin/mono --version
Mono JIT compiler version 1.2.6 (tarball)
Copyright (C) 2002-2007 Novell, Inc and Contributors. www.mono-project.com
TLS: normal
GC: System Boehm (with typed GC)
SIGSEGV: normal
Notification: Thread + polling
Architecture: sparc
Disabled: none
(2) Related Product
This issue was reported in following topics.
MindTouch OpenGarden.org Forums > MindTouch Deki Wiki > Deki Wiki Installation
> Install on Solaris 8 -- 404 and NullReferenceException
http://forums.opengarden.org/showthread.php?t=1347
Thank you!
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list