Re: [Mono-dev] 1147 Ways To Break A Runtime

2006-02-22 Thread Ankit Jain
Hi,


>  . All the tests bar those which reference
> non-existent fields and methods now assemble with Mono
> ilasm and ...


I had fixed this over the weekend (referencing non-existant
methods/fields in a TypeDef), so it should be working now. Are you
using ilasm from svn ?

-Ankit
--
Blog : http://ankitj.blogspot.com
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] 1147 Ways To Break A Runtime

2006-02-22 Thread Jim Purbrick
Hi Paolo/All,

New archive here:

http://homepage.ntlworld.com/james.purbrick/VerifierTests6.tar

I've added tests for loading overlapped fields, boxing
byref types and other exotica, tidied up the scripts
so they are much clearer and simpler and fixed a load
of tests. All the tests bar those which reference
non-existent fields and methods now assemble with Mono
ilasm and all the resultant exes give (only) the
expected verification errors when run through MS
peverify /IL (although MS peverify seems fine about
stack merging native ints with int32s and loading
initonly fields).

> Would you mind extracting the IL template source in
> their own files? Maybe something called 
> testtype.iltmpl. This way it's easier to look at 
> them.

Hmm, I like having the templates in the scripts to
keep  them encapsulated and I think it's easier to
keep the markers in the templates and substitution
commands in sync that way. I've added some white space
between the script commands and templates in the
scripts though, so it's easier to see the CIL now.

> Note that at least some templetes are invalid:
> in make_bin_test.sh the signature of Main() is
> parametrized, but this is not allowed, since only no

> args or string[] is accepted.

I think I've fixed this now.

> The attached Makefile is what I temporarily use

I don't think I got the attachment. I've hacked
together some scripts for now. I'll leave the decision
as to how you want to integrate the tests with the
Mono SVN tree up to you.

> Or, another option that would make testing much
> faster: instead of having independent il programs, 
> make them compile to a library and generate a C# 
> driver program that calls each function with a try
{}
> catch (ExpectedException) {} clause. This can't be 
> done for all the tests, though ...

It also makes it more difficult to run through other
external verifiers or runtime verifiers which don't
through the same exception. I think it's useful to be
able to compare results from the different verifiers,
so I think we should keep the tests as separate CIL
files.

> It is always possible to merge two references to
> Object. This doesn't mean that the later uses of 
> this object are verifiable. Say that a callvirt is 
> done on the object to MyMethod (): this call won't 
> be verifiable, because Object doesn't define a 
> MyMethod () method. Hope this clears things up.

Yes, thanks. I'm going to need a test that's a bit
more involved than the current 10 line CIL snippets
for this one... ;-)

> Not sure what you mean by slot type. The type of the
> target field/local/etc must be compatible with the 
> stack type of the values that is going to be stored 
> to it.

Yes. I needed to read partition I to clear this up.
I,8.7 says that values either need to be assignment
compatible with locations or it needs to be possible
to coerce the value so it is compatible. So, I need
another set of tests for assignment compatibility.
I'll do those tomorrow.

Cheers,

Jim.





___ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail 
http://uk.messenger.yahoo.com
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Mono runtime regression

2006-02-22 Thread Kamil Skalski
Hi!

I noticed another regression, which seems to be caused by
http://lists.ximian.com/pipermail/mono-patches/2006-February/070993.html

It gives
NUnit version 2.2.0
Copyright (C) 2002-2003 James W. Newkirk, Michael C. Two, Alexei A.
Vorontsov, Charlie Poole.
Copyright (C) 2000-2003 Philip Craig.
All Rights Reserved.

OS Version: Unix 2.6.10.0Mono Version: 2.0.50727.42


** ERROR **: file loader.c: line 1582 (mono_method_signature_full):
assertion failed: (mono_metadata_token_table (m->token) ==
MONO_TABLE_METHOD)
aborting...
Abort
make[1]: *** [nunit] Error 134


During execution of Nemerle test suite.

Just if it escape your attention :)  (especially as it seems to fail
quite late in our build/test process). To reproduce:

1. download http://nemerle.org/download/snapshots/nemerle-0.9.2.99.6135.tar.gz
2. configure, so that NUnit is activated (it should detect
nunit-console2 in your environment)
3. make  (to bootstrap compiler)
4. cd lib/tests
5. define NUNIT_LIB=-pkg:/home/user/local/lib/pkgconfig/mono-nunit.pc
in Makefile
6. make

--
Kamil Skalski
http://nazgul.omega.pl
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] System.Drawing.Graphics ignores InterpolationMode

2006-02-22 Thread Peter Dennis Bartok
Funny, this bug complains about the opposite, that only NearestNeighbor is 
used.

http://bugzilla.ximian.com/show_bug.cgi?id=77181

Cheers,
  Peter

-Original Message-
From: "Jonathan Resnick" <[EMAIL PROTECTED]>
To: "'mono-devel mailing list'" 
Date: 22 February, 2006 13:57
Subject: [Mono-dev] System.Drawing.Graphics ignores InterpolationMode


>When using the System.Drawing.Graphics class, I set the the property
>InterpolationMode to InterpolationMode.NearestNeighbor.  However, the image
>rendered to the screen still looks as though it has undergone bilinear
>interpolation.  Running the exact same code on .NET runtime in Windows, the
>image is clearly not interpolated.
>
>Does anyone know if this is a bug (in which case I can submit a bug 
>report),
>or is the InterpolationMode property simply not yet supported on Linux?
>
>Thanks,
>Jonathan
> 

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] System.Drawing.Graphics ignores InterpolationMode

2006-02-22 Thread Jonathan Resnick



When using the 
System.Drawing.Graphics class, I set the the property InterpolationMode to 
InterpolationMode.NearestNeighbor.  However, the image rendered to 
the screen still looks as though it has undergone bilinear interpolation.  
Running the exact same code on .NET runtime in Windows, the image is clearly not 
interpolated.
 
Does anyone know if 
this is a bug (in which case I can submit a bug report), or is the 
InterpolationMode property simply not yet supported on 
Linux?
 
Thanks,
Jonathan
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] [OT] No way to create account on mono-project?

2006-02-22 Thread Mike Kestner
On Wed, 2006-02-22 at 10:03 -0900, Joshua Kugler wrote:
> On Wednesday 22 February 2006 09:55, Richard Torkar wrote:
> > On Feb 22, 2006, at 19:27 , Joshua Kugler wrote:
> > > OK, my first one. :)
> > >
> > > On http://www.mono-project.com/Languages it points to IronPython
> > > via the URL
> > > http://www.ironpython.com/.  While technically correct, that site
> > > seems to be
> > > no longer active.  The URL for the active site is
> > > http://www.gotdotnet.com/workspaces/workspace.aspx?id=ad7acff7-
> > > ab1e-4bcb-99c0-57ac5a3a9742
> > >
> > > Hope that helps.
> >
> > Well actually, I'd prefer this link: http://workspaces.gotdotnet.com/
> > ironpython
> 
> Oh, yeah, so would I.  Didn't realize it worked that way.  Thanks.

Done, thanks.

-- 
Mike Kestner <[EMAIL PROTECTED]>

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] [OT] No way to create account on mono-project?

2006-02-22 Thread Joshua Kugler
On Wednesday 22 February 2006 09:55, Richard Torkar wrote:
> On Feb 22, 2006, at 19:27 , Joshua Kugler wrote:
> > OK, my first one. :)
> >
> > On http://www.mono-project.com/Languages it points to IronPython
> > via the URL
> > http://www.ironpython.com/.  While technically correct, that site
> > seems to be
> > no longer active.  The URL for the active site is
> > http://www.gotdotnet.com/workspaces/workspace.aspx?id=ad7acff7-
> > ab1e-4bcb-99c0-57ac5a3a9742
> >
> > Hope that helps.
>
> Well actually, I'd prefer this link: http://workspaces.gotdotnet.com/
> ironpython

Oh, yeah, so would I.  Didn't realize it worked that way.  Thanks.

j- k-

-- 
Joshua Kugler PGP Key: http://pgp.mit.edu/
CDE System Administrator ID 0xDB26D7CE
http://distance.uaf.edu/
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] [OT] No way to create account on mono-project?

2006-02-22 Thread Richard Torkar


On Feb 22, 2006, at 19:27 , Joshua Kugler wrote:


On Wednesday 22 February 2006 09:02, Miguel de Icaza wrote:

Hello,

Is there a way to get an account to contribute at least by fixing  
any

errors on the site or writing tutorials? Or should we just notify a
contributor with changes and tutorials to post up there?


You can start by pointing out the issues, or joining the mono-docs- 
list.


OK, my first one. :)

On http://www.mono-project.com/Languages it points to IronPython  
via the URL
http://www.ironpython.com/.  While technically correct, that site  
seems to be

no longer active.  The URL for the active site is
http://www.gotdotnet.com/workspaces/workspace.aspx?id=ad7acff7- 
ab1e-4bcb-99c0-57ac5a3a9742


Hope that helps.


Well actually, I'd prefer this link: http://workspaces.gotdotnet.com/ 
ironpython


/Richard
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Mono on Mac OS X Intel.

2006-02-22 Thread Daniel Lundqvist

Paolo Molaro wrote:

On 02/22/06 Daniel Lundqvist wrote:


From what I understand support for subject is not finished at the


moment. Would love to start trying it out.

Is there anything I can do to help?
I can try patches, setup account on my machine for developers or
anything else you can think of. Unfortunately I'm not that well  
read up

on mono source so there I wouldn't be of much help.


What's currently in svn should bootstrap: there are still some
stack alignment issues, though.


Thanks, I'll try it out. Does this mean PInvoke won't work? Was thinking
of trying CocoaSharp as well.

--
daniel

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] [OT] No way to create account on mono-project?

2006-02-22 Thread Joshua Kugler
On Wednesday 22 February 2006 09:02, Miguel de Icaza wrote:
> Hello,
>
> > Is there a way to get an account to contribute at least by fixing any
> > errors on the site or writing tutorials? Or should we just notify a
> > contributor with changes and tutorials to post up there?
>
> You can start by pointing out the issues, or joining the mono-docs-list.

OK, my first one. :)

On http://www.mono-project.com/Languages it points to IronPython via the URL 
http://www.ironpython.com/.  While technically correct, that site seems to be 
no longer active.  The URL for the active site is 
http://www.gotdotnet.com/workspaces/workspace.aspx?id=ad7acff7-ab1e-4bcb-99c0-57ac5a3a9742

Hope that helps.

j- k-

-- 
Joshua Kugler PGP Key: http://pgp.mit.edu/
CDE System Administrator ID 0xDB26D7CE
http://distance.uaf.edu/
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] [OT] No way to create account on mono-project?

2006-02-22 Thread Miguel de Icaza
Hello,

> Is there a way to get an account to contribute at least by fixing any
> errors on the site or writing tutorials? Or should we just notify a
> contributor with changes and tutorials to post up there?

You can start by pointing out the issues, or joining the mono-docs-list.

If you contribute frequently, we can give you an account.  
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] performance patch for TypeDescriptor

2006-02-22 Thread Miguel de Icaza
Hello Andrew,

> on dotnet it takes 12 seconds to perform 10,000,000 of such loops, while
> on mono it takes 20 second for 10,000. So the performance is worse in
> more than 1000 times.

I love the idea of this patch, feel free to apply it.

As usual, if you could add some tests, it would be even better.

Miguel
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] 1003 Ways To Break A Runtime

2006-02-22 Thread Paolo Molaro
On 02/21/06 Jim Purbrick wrote:
> > No. Say you have:
> > 
> > class A {}
> > class B : A {}
> > class C : B {}
> > 
> > Merging B and C will result in a B type, not Object.
> > The spec says: the closest common supertype.
> > If you need to merge C and string, then the closest
> > supertype is Object.
> 
> But, if all objects are subtypes of Object, any 2
> object types will merge, so its always possible to
> merge 2 stacks with equal numbers of object types?

It is always possible to merge two references to Object.
This doesn't mean that the later uses of this object are
verifiable. Say that a callvirt is done on the object
to MyMethod (): this call won't be verifiable, because Object doesn't
define a MyMethod () method.
You may try that writing a test and running peverify on it.
That said I don't remember what exactly the MS runtime does in these
cases, but I think it will compile the method if you have full trust,
but insert a cast before the call so that you get an exception at
runtime if the object is not of the right type.

Hope this clears things up.

> > > 7) When does coercion happen?
> >
> > Coercion should happens every time there is a store,
> > so calls, stloc, starg, stfld, stsfld, stelem, box, 
> > stobj, cpobj, stind.
> 
> OK, done. Are there other tests needed for these
> opcodes? Do the slot type and stack type also have to
> match according to the verification type compatibility
> rules?

Not sure what you mean by slot type. The type of the target
field/local/etc must be compatible with the stack type of the values
that is going to be stored to it.

lupus

-- 
-
[EMAIL PROTECTED] debian/rules
[EMAIL PROTECTED] Monkeys do it better
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] 1076 Ways To Break A Runtime

2006-02-22 Thread Paolo Molaro
On 02/22/06 Jim Purbrick wrote:
> This version incorporates all of the old tests. Most
> are generated from templates, but there were the odd
> few that didn't warrant a template and couldn't be
> generated from an existing one, so I've just included
> those as cil files.

Sounds good.
Would you mind extracting the IL template source in their own files?
Maybe something called testtype.iltmpl.
This way it's easier to look at them.

Note that at least some templetes are invalid:
in make_bin_test.sh the signature of Main() is parametrized, but this is
not allowed, since only no args or string[] is accepted.

> I think Lupus had a plan for integrating the tests in
> to the Mono build/test process. I am planning to write

The attached Makefile is what I temporarily use, it doesn't count
that all the cil files have been compiled and that we really threw the
exception (need a cmdline option for that).
Or, another option that would make testing much faster:
instead of having independent il programs, make them compile
to a library and generate a C# driver program that calls each function
with a try {} catch (ExpectedException) {} clause. This can't be done
for all the tests, though ...

lupus

-- 
-
[EMAIL PROTECTED] debian/rules
[EMAIL PROTECTED] Monkeys do it better
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Screen Capture with Mono

2006-02-22 Thread Evan Hazlett
thanks...im still a newb...  ;)On 2/22/06, Paolo Molaro <[EMAIL PROTECTED]> wrote:
On 02/20/06 Evan Hazlett wrote:> im looking for a way to perform a screen capture with Mono in Linux...>> i know in Win32, you can use dllimport, but Im not sure what to use with> Linux...[...]
> btw...  i did do a quick google search.. ;)Must use a different google than the rest of us;)Execute:xwd -root -out file.xand the convert the file (You need the imagemagick utils installed
or some other image conversion tool):convert file.x file.pngMake sure you remove the file.x file.lupus---
[EMAIL PROTECTED] debian/rules[EMAIL PROTECTED] Monkeys do it better___
Mono-devel-list mailing listMono-devel-list@lists.ximian.comhttp://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] libgtkembedmoz.so + sigsegv

2006-02-22 Thread Paolo Molaro
On 02/20/06 Jurgen Schoeters wrote:
> My program sometimes crashes with a segmentation fault caused by
> libgtkembedmoz.so . I've seen some bug reports on the net but no
> solution,does someone know how to bypass the problem ?
> I've used libgtkembedmoz.so from mozilla-1.7.12 .

Do you have a test case that reproduces the bug?

lupus

-- 
-
[EMAIL PROTECTED] debian/rules
[EMAIL PROTECTED] Monkeys do it better
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Screen Capture with Mono

2006-02-22 Thread Paolo Molaro
On 02/20/06 Evan Hazlett wrote:
> im looking for a way to perform a screen capture with Mono in Linux...
> 
> i know in Win32, you can use dllimport, but Im not sure what to use with
> Linux...
[...]
> btw...  i did do a quick google search.. ;)

Must use a different google than the rest of us;)

Execute:
xwd -root -out file.x
and the convert the file (You need the imagemagick utils installed
or some other image conversion tool):
convert file.x file.png

Make sure you remove the file.x file.

lupus

-- 
-
[EMAIL PROTECTED] debian/rules
[EMAIL PROTECTED] Monkeys do it better
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] GC startup time on windows (in DllMain)

2006-02-22 Thread Aras Pranckevicius
> Just a wild guess: your P4 is a SMP machine (hyperthreading).
> Since VMware (where you said the startup time is fast) doesn't
> simulate SMP, I'd say this is a SMP problem of the GC.

Yes, it is a P4 with HT.

Is long GC startup time on SMP machines a known issue? (if so - why it
does not manifest itself on a dual CPU powermac?)

Is there some way to speedup the startup time?


Aras Pranckevicius
otee.dk
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Cron Jobs in mono, plesk 7.5 reloaded

2006-02-22 Thread Paolo Molaro
On 02/20/06 Martin Tuncaydin wrote:
> I am trying to run a cron on an aspx file in mono. I have plesk reloaded 7.5
> on fedora core 2. Has anyone any suggestions on how to do this, I don't know
> where to start.

Cron jobs are added by editing the crontab for the user.
There is nothing specific to mono there.

lupus

-- 
-
[EMAIL PROTECTED] debian/rules
[EMAIL PROTECTED] Monkeys do it better
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Mono on Mac OS X Intel.

2006-02-22 Thread Paolo Molaro
On 02/22/06 Daniel Lundqvist wrote:
> >>From what I understand support for subject is not finished at the
> moment. Would love to start trying it out.
> 
> Is there anything I can do to help?
> I can try patches, setup account on my machine for developers or
> anything else you can think of. Unfortunately I'm not that well read up
> on mono source so there I wouldn't be of much help.

What's currently in svn should bootstrap: there are still some
stack alignment issues, though.

lupus

-- 
-
[EMAIL PROTECTED] debian/rules
[EMAIL PROTECTED] Monkeys do it better
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] [Patch] Constant changes in mono/support/serial.c

2006-02-22 Thread Paolo Molaro
On 02/22/06 Carlos Alberto Cortez wrote:
> The attached patch updates some comparisons in mono/support/serial.c
> (some values inside System.IO.Ports changed and need to be taken in
> count).
> 
> May I proceed?

Please introduce an enum in the C code that mirrors the one in C# code
and use that instead of the magic numbers. Also, add a comment to the C#
code of the enum that warns that the two need to be kept in sync, so
the next time someone adds to them, they will hopefully also change the
C side.
After that you can commit.
Thanks!

lupus

-- 
-
[EMAIL PROTECTED] debian/rules
[EMAIL PROTECTED] Monkeys do it better
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] can mono run under AIX 4.3, 5.2

2006-02-22 Thread Paolo Molaro
On 02/22/06 zhu shi song wrote:
>   I hope my C# web application can run under AIX 6000.
>  The OS versions of AIX6000 are 4.3, 5.2. Who know if
> there is mono binary release for aix?

We don't have access to AIX boxes and nobody who does has stepped up to
do the port (which should be mostly trivial, mono already runs on ppc).
You may want to google for details posted a while ago about this.

lupus

-- 
-
[EMAIL PROTECTED] debian/rules
[EMAIL PROTECTED] Monkeys do it better
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] performance patch for TypeDescriptor

2006-02-22 Thread Andrew Skiba
Hello,

I found a big performance trouble relative to dotnet with the following
code:

   static void Main(string[] args)
   {
while (true) {
DateTime start = DateTime.Now;
for (int i=0; i<1000; i++) {
TextBox tb = new TextBox ();
TypeDescriptor.GetProperties (tb);
tb.Dispose ();
}
TimeSpan ts = DateTime.Now - start;
Console.WriteLine (ts.ToString());
}
   }

on dotnet it takes 12 seconds to perform 10,000,000 of such loops, while
on mono it takes 20 second for 10,000. So the performance is worse in
more than 1000 times.

'TypeDescriptor.GetProperties(Object component)' treats component
differently if it
implements IComponent. This is done in order to allow the component
'Site' to filter
the attributes (see TypeDescriptor lines 760-764).

However, if the Site of the component is null all of this is unnecessary
and one can
use the component type to retrieve the components properties. We have
seen that
System.Web.UI.Control implements IComponent but its Site property is
always null (unless
modified by the programmer explicitly) making this case frequent and
important.
We therefore propose the attached patch that uses the component's type
to retrieve its
properties, events and attributes if the component Site property is
null, and uses the
component only if Site is not null.

I attach also a simple WebForm that reveals the performance gain in a
real web environment.
To test it, make a GET request, set the value of TextBox1 to a string
starting with 'a' to pass
validation, and make POST. Before this patch I had 1800 rps, and after -
2600 rps.

Regards, Andrew.



TypeDescriptor.cs.patch
Description: TypeDescriptor.cs.patch


WebForm1.aspx
Description: WebForm1.aspx


WebForm1.aspx.cs
Description: WebForm1.aspx.cs
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Re: [PATCH] Verbose message for disk full error.

2006-02-22 Thread Dick Porter
On Wed, 2006-02-22 at 12:49 +0100, Jörg Rosenkranz wrote:
> Hi Dick,
> 
> The attached patch adds a verbose exception to error 39
> (disk full). Is it save to commit this change?

Looks good to me.

Thanks,

- Dick


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] GC startup time on windows (in DllMain)

2006-02-22 Thread Robert Jordan

Hey,


When profiling our startup times on Windows, I noticed that GC_init
takes quite long (~1.5 seconds on P4 3GHz), called from DllMain.

The call graph goes roughly like this: DllMain -> GC_init ->
GC_init_inner -> GC_gcollect_inner (GC_try_to_collect_inner) ->
GC_stopped_mark -> GC_mark_some_inner -> GC_mark_from. In
GC_mark_from, still 1.5 seconds spent.

After that it's strange - VTune just does not say anything - 1.5
seconds spent in there, nothing spent in functions called from it.

We do not have this issue on Macs, where loading mono bundle takes
almost no time. When I tested our windows version under VMWare, the
startup time was also fast for some reason.


Just a wild guess: your P4 is a SMP machine (hyperthreading).
Since VMware (where you said the startup time is fast) doesn't
simulate SMP, I'd say this is a SMP problem of the GC.

Robert

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] GC startup time on windows (in DllMain)

2006-02-22 Thread Aras Pranckevicius
Hi,

When profiling our startup times on Windows, I noticed that GC_init
takes quite long (~1.5 seconds on P4 3GHz), called from DllMain.

The call graph goes roughly like this: DllMain -> GC_init ->
GC_init_inner -> GC_gcollect_inner (GC_try_to_collect_inner) ->
GC_stopped_mark -> GC_mark_some_inner -> GC_mark_from. In
GC_mark_from, still 1.5 seconds spent.

After that it's strange - VTune just does not say anything - 1.5
seconds spent in there, nothing spent in functions called from it.

We do not have this issue on Macs, where loading mono bundle takes
almost no time. When I tested our windows version under VMWare, the
startup time was also fast for some reason.

Is the startup time supposed to be this long, or am I just having some issue?


Aras Pranckevicius
otee.dk
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Building Mono on Linux/Alpha

2006-02-22 Thread Zoltan Varga
 Hi,

  You can use whatever calling convention you want when calling
managed methods, but
the JIT needs to support calling native functions as well. Most
architectures pass
structures on the stack when calling managed methods, and implement
the platform ABI
when calling native methods.

As for the second question: In mini_init (), there are some calls
which can be commented
out if your JIT is not yet able to run some managed code, like
JIT_RUNTIME_WORKS.
Crashing in InitializeArray () usually means problems with handling
RuntimeHandles,
ldtoken etc.

   Zoltan

On 2/22/06, Sergey Tikhonov <[EMAIL PROTECTED]> wrote:
> Zoltan Varga wrote:
>
> >  Hi,
> >
> > You can put it into mono_arch_emit_exceptions ().
> >
> > Zoltan
> >
> >
> Thanks you.
> I hit another blocking issue - inplementation of OP_OUTARG_VT. Different
> arches do it differently.
> Is my understanding is correct - that I could pass it on stack for
> simplicity (like ia64 does), but the called
> method should expect it on stack too. This kind of parameter is not
> expected to be passed to any natively
> compiled methods (by gcc) (because by Alpha ABI upto 6 parameters are
> expected to be passed in registers).
> So if the called method is compiled by jit I guess I have control over
> where to look for method parameters.
>
> I got to the point of calling
> System.Runtime.CompilerServices.RuntimeHelpers:InitializeArray(System.Array,
> intptr) and
> crashing inside. Is there simpler way to check JIT? :) I am using
> compiled "basic.cs" as start point, but it tries to initialize
> part of runtime (I guess) and it is not the simple one.
>
> Thank you,
>
> --
> Sergey Tikhonov
> Solvo Ltd.
> [EMAIL PROTECTED]
>
>
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] [PATCH] Verbose message for disk full error.

2006-02-22 Thread Jörg Rosenkranz
Hi Dick,

The attached patch adds a verbose exception to error 39
(disk full). Is it save to commit this change?

Thanks,
Joerg.


DiskFullException.diff
Description: DiskFullException.diff
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] [Patch] Constant changes in mono/support/serial.c

2006-02-22 Thread Carlos Alberto Cortez
Hello,

The attached patch updates some comparisons in mono/support/serial.c
(some values inside System.IO.Ports changed and need to be taken in
count).

May I proceed?

Carlos.
Index: serial.c
===
--- serial.c	(revisión: 56687)
+++ serial.c	(copia de trabajo)
@@ -121,21 +121,21 @@
 	}
 
 	switch (parity) {
-	case 0: /* Even */
-		newtio.c_iflag &= ~IGNPAR;
-		newtio.c_cflag |= PARENB;
-		break;
-	case 1: /* Mark */
-		/* XXX unhandled */
-		break;
-	case 2: /* None */
+	case 0: /* None */
 		newtio.c_iflag |= IGNPAR;
 		newtio.c_cflag &= ~(PARENB | PARODD);
 		break;
-	case 3: /* Odd */
+	case 1: /* Odd */
 		newtio.c_iflag &= ~IGNPAR;
 		newtio.c_cflag |= PARENB | PARODD;
 		break;
+	case 2: /* Even */
+		newtio.c_iflag &= ~IGNPAR;
+		newtio.c_cflag |= PARENB;
+		break;
+	case 3: /* Mark */
+		/* XXX unhandled */
+		break;
 	case 4: /* Space */
 		/* XXX unhandled */
 		break;
@@ -154,10 +154,10 @@
 
 	newtio.c_cflag &= ~CSTOPB;
 	switch (stopBits) {
-	case 0: /* One */
+	case 1: /* One */
 		/* do nothing, the default is one stop bit */
 		break;
-	case 1: /* OnePointFive */
+	case 3: /* OnePointFive */
 		/* XXX unhandled */
 		break;
 	case 2: /* Two */
@@ -174,27 +174,26 @@
 	case 0: /* None */
 		/* do nothing */
 		break;
-	case 1: /* RequestToSend (RTS) */
+	case 2: /* RequestToSend (RTS) */
 #ifdef CRTSCTS
 		newtio.c_cflag |= CRTSCTS;
 #endif /* def CRTSCTS */
 		break;
-	case 2: /* RequestToSendXOnXOff (RTS + XON/XOFF) */
+	case 3: /* RequestToSendXOnXOff (RTS + XON/XOFF) */
 #ifdef CRTSCTS
 		newtio.c_cflag |= CRTSCTS;
 #endif /* def CRTSCTS */
 		/* fall through */
-	case 3: /* XOnXOff */
+	case 1: /* XOnXOff */
 		newtio.c_iflag |= IXOFF;
 		//		newtio.c_oflag |= IXON;
 		break;
 	}
 	
-	cfsetospeed (&newtio, baud_rate);
-	cfsetispeed (&newtio, baud_rate);
+	if (cfsetospeed (&newtio, baud_rate) < 0 || cfsetispeed (&newtio, baud_rate) < 0 ||
+			tcsetattr (fd, TCSADRAIN, &newtio) < 0)
+		return FALSE;
 
-	tcsetattr(fd,TCSADRAIN,&newtio);
-
 	return TRUE;
 }
 
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] can mono run under AIX 4.3, 5.2

2006-02-22 Thread zhu shi song
Dear lists,
  I hope my C# web application can run under AIX 6000.
 The OS versions of AIX6000 are 4.3, 5.2. Who know if
there is mono binary release for aix?

  tks 
  zhu

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Mono on Mac OS X Intel.

2006-02-22 Thread Daniel Lundqvist
Hi,

>From what I understand support for subject is not finished at the
moment. Would love to start trying it out.

Is there anything I can do to help?
I can try patches, setup account on my machine for developers or
anything else you can think of. Unfortunately I'm not that well read up
on mono source so there I wouldn't be of much help.

-- 
daniel

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] corcompare patch to generate well-formed XML

2006-02-22 Thread Atsushi Eno
Hello,

After hearing from Gonzalo that buggy XmlTextWriter (by design)
outputs invalid XML which caused corcompare breakage, I created
a corcompare patch and an XmlWriter wrapper that avoids invalid
XML output (such as ).

XmlTextReader is similarly buggy (by design) to accept such invalid
character references by default (unless you set Normalization=true),
so as long as those api-info are fed only to corcompare itself,
there won't be problem.

(If you try xmllint against existing masterinfos, you will
understand what is the problem I am talking about.)

Note that this WellFormedXmlWriter.cs is not for general use (yet)
since it handles only WriteString().

If no objection I'll commit them cpl days later.

Atsushi Eno
Index: ChangeLog
===
--- ChangeLog   (revision 57123)
+++ ChangeLog   (working copy)
@@ -1,3 +1,11 @@
+2006-02-22  Atsushi Enomoto  <[EMAIL PROTECTED]>
+
+   * WellFormedXmlWriter.cs : new file to escape invalid XML
+ characters.
+   * mono-api-info.cs mono-api-diff.cs : don't use XmlTextWriter
+ directly when you don't know what you are going to write.
+ escape invalid characters as \xXX or \u.
+
 2006-01-26  Atsushi Enomoto  <[EMAIL PROTECTED]>
 
* mono-api-info.cs
Index: mono-api-diff.cs
===
--- mono-api-diff.cs(revision 57123)
+++ mono-api-diff.cs(working copy)
@@ -30,7 +30,8 @@
 
XmlTextWriter writer = new XmlTextWriter (Console.Out);
writer.Formatting = Formatting.Indented;
-   doc.WriteTo (writer);
+   WellFormedXmlWriter wfwriter = new WellFormedXmlWriter 
(writer);
+   doc.WriteTo (wfwriter);
 
return 0;
}
Index: mono-api-info.cs
===
--- mono-api-info.cs(revision 57123)
+++ mono-api-info.cs(working copy)
@@ -37,9 +37,10 @@
 
XmlTextWriter writer = new XmlTextWriter (Console.Out);
writer.Formatting = Formatting.Indented;
+   WellFormedXmlWriter wfwriter = new WellFormedXmlWriter 
(writer);
XmlNode decl = doc.CreateXmlDeclaration ("1.0", null, 
null);
doc.InsertBefore (decl, doc.DocumentElement);
-   doc.WriteTo (writer);
+   doc.WriteTo (wfwriter);
return 0;
}
}
Index: Makefile
===
--- Makefile(revision 57123)
+++ Makefile(working copy)
@@ -28,8 +28,8 @@
 
 PROGRAM_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
 
-APIINFO_SOURCES = mono-api-info.cs
-APIDIFF_SOURCES = mono-api-diff.cs
+APIINFO_SOURCES = mono-api-info.cs WellFormedXmlWriter.cs
+APIDIFF_SOURCES = mono-api-diff.cs WellFormedXmlWriter.cs
 
 DISTFILES= $(CORCOMPARE_SOURCES) $(APIINFO_SOURCES) $(APIDIFF_SOURCES)
 
//
// WellFormedXmlWriter.cs
//
// Author:
//  Atsushi Enomoto <[EMAIL PROTECTED]>
//
// Copyright (C) 2006 Novell, Inc. http://www.novell.com
//
using System;
using System.Globalization;
using System.Collections;
using System.Xml;

public class WellFormedXmlWriter : DefaultXmlWriter
{
public static bool IsValid (int ch)
{
return !IsInvalid (ch);
}

public static bool IsInvalid (int ch)
{
switch (ch) {
case 9:
case 10:
case 13:
return false;
}
if (ch < 32)
return true;
if (ch < 0xD800)
return false;
if (ch < 0xE000)
return true;
if (ch < 0xFFFE)
return false;
if (ch < 0x1)
return true;
if (ch < 0x11)
return false;
else
return true;
}

public static int IndexOfInvalid (string s, bool allowSurrogate)
{
for (int i = 0; i < s.Length; i++)
if (IsInvalid (s [i])) {
if (!allowSurrogate ||
i + 1 == s.Length ||
s [i] < '\uD800' ||
s [i] >= '\uDC00' ||
s [i + 1] < '\uDC00' ||