bugDotGNU Portable.NET - Bugs: bug #17177, Can't run the Chrome compiler...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #17177: Can't run the Chrome compiler during weird error with virtual method call

Submitter:  None
Submitted:  Sat 22 Jul 2006 02:45:23 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Wont Fix
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Jump to the original submission

Tue 25 Jul 2006 08:42:59 PM UTC, comment #8: 

It seems to be an issue with Microsofts C# 1.1 compiler, yes. That is also the conclusion from the RemObjects side, they will look into fixing this in a future build.

I think you can close this bug now as pnet behaves correctly here.

Anonymous
Tue 25 Jul 2006 03:07:50 PM UTC, comment #7: 

The code seems to have two classes which have no common parent, but share an interface -

load this (type x)
br label

load default(type y)
label:
callvirt(interface z)


where x and y implement z. But the stack merge according to ECMA-335  (1.8.1.3) states that:-

   The merged type, U, shall be computed as follows

   1.             if S := T then U=S

   2.             Otherwise if T := S then U=T

   3.             Otherwise, if S and T are both object types,
                  then let V be the closest common supertype of
                  S and T then U=V.

   4.             Otherwise, the merge shall fail.

And our merge takes common_supertype(x,y) == System.Object which
does not implement z eventhough x & y do.

Now this code compiled by MS CSC seems to be in violation of
the basic verifiability criterion as specified by ECMA.

shrug

Gopal.V <t3rmin4t0r>
Group administrator
Tue 25 Jul 2006 08:13:03 AM UTC, comment #6: 

I've discussed this issue further with the RemObjects developers.

They told me that they don't create an instance of System.Object anywhere (which doesn't make sense anyway) and that this assembly also doesn't contain any unsafe code.

I have received an unobfuscated version of the assemblies today and will do some more debugging with them.

Anonymous
Sun 23 Jul 2006 08:14:29 PM UTC, comment #5: 

For me it doesn't make much sense to pass something not compatible to a function, unsafe or not ;-).

I'd really like to know why the Chrome compiler does this.

I know that the Chrome assemblies are obfuscated, but maybe I can get the not-obfuscated version of the assemblies and find out what this method call does.

P.S: I changed the function to accept this type of assignment in unsafe code in my local copy of the sourcecode and now Chrome runs fine.

Anonymous
Sun 23 Jul 2006 03:38:42 PM UTC, comment #4: 

From what i see fails the verification because an System.Object is passed as an argument where an interface is required.

The exact location is in verify.c Function AssignCompatible line 478.

The code itself is unsafe.

Any idea how this should be handled in unsafe code ?

btw. The funny names printed here are the names in the Chrome assemblies.


Klaus Treichel <ktreichel>
Group administrator
Sun 23 Jul 2006 07:20:25 AM UTC, comment #3: 

That's the reason I included the download link in the bug report ;-).

If you don't want to download the full 13 MB package, I have attached only the three necessary files (Chrome.exe, Chrome.Compiler.dll, Main.pas).

The command line compile is free, so you don't have to worry about licensing problems either.

If you don't want to install Chrome, what can I do to help you debugging this problem?

I saw in the sourcecode of ilrun that there is something like #ifdef IL_DEBUGGER, is there a way to build a debug version of pnet or something?

I already try to debug a little bit (using gdb + ddd), but I'm not very familiar with the Linux development tools yet.

Anonymous
Sat 22 Jul 2006 04:52:56 PM UTC, comment #2: 

Sorry, i don't have Chrome on my box so i can't debug this problem.

Klaus Treichel <ktreichel>
Group administrator
Sat 22 Jul 2006 03:10:17 PM UTC, comment #1: 

I forgot to add that you have to feed the compiler with somthing, I've attached a "Hello World!" application in Chrome.

Just run "ilrun Chrome.exe Main.pas"

Anonymous
Sat 22 Jul 2006 02:45:23 PM UTC, original submission:  

I tried to run the Chrome compiler from RemObjects Software using pnet, but it fails with the following error:

"some weird characters" [38DDE] - callvirt at ../../../pnet/engine/verify_call.c:2032

ilverify (segfaults!) also doesn't like the Chrome executable (though it peverifies on Windows). The whole program is written in .NET 1.1 and only references these assemblies:

 mscorlib/1.0.5000.0
 RemObjects.Chrome.Compiler/2.0.0.307
 System/1.0.5000.0
 System.Xml/1.0.5000.0

RemObjects.Chrome.Compiler.dll references:

 mscorlib/1.0.5000.0
 System/1.0.5000.0
 System.Xml/1.0.5000.0
 module mscoree.dll

Could it be that the "mscoree.dll" is that source of this problem?

I'm using the CVS version of pnet (2006-07-20).

The guys at RemObjects Software told me that it isn't their fault that the program doesn't work under pnet (it works with .NET and Mono and it does peverify, ...).

Ah yes, almost forgot g: I'm using Debian Linux "testing".

P.S: You can get a linux tarball (packaged for use with Mono) here:
http://www.chromesville.com/download.asp?id={8C886BE9-D23B-4D6F-8C59-581875A30632}&nodownloadinfo=now

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #10401:  chrome.tar.bz2 added by None (485KiB - application/x-bzip2 - Chrome Compiler 1.5.3.301)
file #10400:  Main.pas added by None (212B - text/plain - Sample Sourcecode)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 4 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-07-27 t3rmin4t0r StatusNone Wont Fix
    Open/ClosedOpen Closed
2006-07-23 None Attached File- Added chrome.tar.bz2, #10401
2006-07-22 None Attached File- Added Main.pas, #10400

Back to the top

Powered by Savane 3.13-02a9.
Corresponding source code