[Mono-bugs] [Bug 560388] New: Crash in Environment.UserName if USER not set
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Dec 3 10:56:30 EST 2009
http://bugzilla.novell.com/show_bug.cgi?id=560388
http://bugzilla.novell.com/show_bug.cgi?id=560388#c0
Summary: Crash in Environment.UserName if USER not set
Classification: Mono
Product: Mono: Class Libraries
Version: 2.4.x
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: CORLIB
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: tedu at fogcreek.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12)
Gecko/20080207 Ubuntu/7.10 (gutsy) Firefox/2.0.0.12
During startup, USER is not set. get_UserName then crashes trying to make a
mono string out of a NULL string. We're using eglib, where g_get_user_name is
implemented as simply getenv("USER"). I don't know what the implementation is
like in the real glib.
So, I guess the possible bugs would be:
1. eglib g_get_user_name is too simple
2. get_UserName has no recourse for handling null names
3. What happens to CreateApplicationHost if it gets an empty name?
Stacktrace:
at (wrapper managed-to-native) System.Environment.get_UserName () <0x00004>
at (wrapper managed-to-native) System.Environment.get_UserName ()
<0xffffffff>
at System.Web.Hosting.ApplicationHost.CreateApplicationHost
(System.Type,string,string) <0x00238>
at Mono.WebServer.VPathToHost.CreateHost
(Mono.WebServer.ApplicationServer,Mono.WebServer.WebSource) <0x00078>
at Mono.WebServer.ApplicationServer.GetApplicationForPath
(string,int,string,bool) <0x000e0>
at (wrapper remoting-invoke-with-check)
Mono.WebServer.ApplicationServer.GetApplicationForPath (string,int,string,bool)
<0xffffffff>
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
--
Configure bugmail: http://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