Quantcast

DLL&C connect debug exception

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

DLL&C connect debug exception

Terry Raymond

One of my packages uses an external interface. In a recent rebuild somehow the interface

was compiled with the optimization level set to #debug. As a result, an exception occurred

during testing. The type checker flagged a function argument as not being the correct type.

 

The type is supposed to be a "long *". As I understand it, the argument can be created as;

                arg := xif LONG gcMalloc.   This sets arg to a CPointer.

We have been using;

                arg := xif LONG newInFixedSpace.  This sets arg to a CDatum.

 

When the interface is compiled with #full optiimization calling the function with the CDatum

works fine, but if the interface is compiled with #debug an exception is raised.

 

Is this a bug with the type checker or is the argument being improperly created?

 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: DLL&C connect debug exception

Reinout Heeck-3
On 7/16/2015 2:45 PM, Terry Raymond wrote:

One of my packages uses an external interface. In a recent rebuild somehow the interface

was compiled with the optimization level set to #debug. As a result, an exception occurred

during testing. The type checker flagged a function argument as not being the correct type.

 

The type is supposed to be a "long *". As I understand it, the argument can be created as;

                arg := xif LONG gcMalloc.   This sets arg to a CPointer.

We have been using;

                arg := xif LONG newInFixedSpace.  This sets arg to a CDatum.

 

When the interface is compiled with #full optiimization calling the function with the CDatum

works fine, but if the interface is compiled with #debug an exception is raised.

 

Is this a bug with the type checker or is the argument being improperly created?


The argument seems to be properly created as far as the DLLCC library is concerned:

    |oop|
    oop := Win32SystemSupport new LONG newInFixedSpace.
    oop == oop asPointerParameter

evaluates to true.





HTH,

R
-


 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: DLL&C connect debug exception

Terry Raymond

Where is #asPointerParameter defined? It is not in my 7.9 image.

 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Reinout Heeck
Sent: Thursday, July 16, 2015 11:33 AM
To: [hidden email]
Subject: Re: [vwnc] DLL&C connect debug exception

 

On 7/16/2015 2:45 PM, Terry Raymond wrote:

One of my packages uses an external interface. In a recent rebuild somehow the interface

was compiled with the optimization level set to #debug. As a result, an exception occurred

during testing. The type checker flagged a function argument as not being the correct type.

 

The type is supposed to be a "long *". As I understand it, the argument can be created as;

                arg := xif LONG gcMalloc.   This sets arg to a CPointer.

We have been using;

                arg := xif LONG newInFixedSpace.  This sets arg to a CDatum.

 

When the interface is compiled with #full optiimization calling the function with the CDatum

works fine, but if the interface is compiled with #debug an exception is raised.

 

Is this a bug with the type checker or is the argument being improperly created?


The argument seems to be properly created as far as the DLLCC library is concerned:

    |oop|
    oop := Win32SystemSupport new LONG newInFixedSpace.
    oop == oop asPointerParameter

evaluates to true.





HTH,

R
-



 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 




_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: DLL&C connect debug exception

Boris Popov, DeepCove Labs (SNN)

Terry,

 

Package is “Com- External Data Enhancements”.

 

-Boris

DeepCove Labs

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Terry Raymond
Sent: Thursday, July 16, 2015 10:20 AM
To: 'Reinout Heeck'; [hidden email]
Subject: Re: [vwnc] DLL&C connect debug exception

 

Where is #asPointerParameter defined? It is not in my 7.9 image.

 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 

From: [hidden email] [[hidden email]] On Behalf Of Reinout Heeck
Sent: Thursday, July 16, 2015 11:33 AM
To: [hidden email]
Subject: Re: [vwnc] DLL&C connect debug exception

 

On 7/16/2015 2:45 PM, Terry Raymond wrote:

One of my packages uses an external interface. In a recent rebuild somehow the interface

was compiled with the optimization level set to #debug. As a result, an exception occurred

during testing. The type checker flagged a function argument as not being the correct type.

 

The type is supposed to be a "long *". As I understand it, the argument can be created as;

                arg := xif LONG gcMalloc.   This sets arg to a CPointer.

We have been using;

                arg := xif LONG newInFixedSpace.  This sets arg to a CDatum.

 

When the interface is compiled with #full optiimization calling the function with the CDatum

works fine, but if the interface is compiled with #debug an exception is raised.

 

Is this a bug with the type checker or is the argument being improperly created?


The argument seems to be properly created as far as the DLLCC library is concerned:

    |oop|
    oop := Win32SystemSupport new LONG newInFixedSpace.
    oop == oop asPointerParameter

evaluates to true.





HTH,

R
-


 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: DLL&C connect debug exception

Reinout Heeck-3
On 7/16/2015 7:43 PM, Boris Slobodin wrote:

Terry,

 

Package is “Com- External Data Enhancements”.

 


Indeed, COM-specific but good enough I guess to see that it can be passed to C as a pointer.


Terry, the newInFixedSpace-ed object does not carry any C type information while the gcMalloc-ed variant does 'know' its type.
Can it be that the C procedure you are calling has its type defined in such a roundabout way that the runtime infrastructure (and the type checker) can no longer infer compatibility of the object pointer with the C argument type (even though/if it is valid)?


I did find out that this throws an exception:

    |oop|
    oop := Win32SystemSupport new LONG newInFixedSpace.
    Win32SystemSupport new LONG pointerType cast: oop

but then the involved method dues have a comment "Should we do better?"


R
-



-Boris

DeepCove Labs

 

From: [hidden email] [[hidden email]] On Behalf Of Terry Raymond
Sent: Thursday, July 16, 2015 10:20 AM
To: 'Reinout Heeck'; [hidden email]
Subject: Re: [vwnc] DLL&C connect debug exception

 

Where is #asPointerParameter defined? It is not in my 7.9 image.

 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 

From: [hidden email] [[hidden email]] On Behalf Of Reinout Heeck
Sent: Thursday, July 16, 2015 11:33 AM
To: [hidden email]
Subject: Re: [vwnc] DLL&C connect debug exception

 

On 7/16/2015 2:45 PM, Terry Raymond wrote:

One of my packages uses an external interface. In a recent rebuild somehow the interface

was compiled with the optimization level set to #debug. As a result, an exception occurred

during testing. The type checker flagged a function argument as not being the correct type.

 

The type is supposed to be a "long *". As I understand it, the argument can be created as;

                arg := xif LONG gcMalloc.   This sets arg to a CPointer.

We have been using;

                arg := xif LONG newInFixedSpace.  This sets arg to a CDatum.

 

When the interface is compiled with #full optiimization calling the function with the CDatum

works fine, but if the interface is compiled with #debug an exception is raised.

 

Is this a bug with the type checker or is the argument being improperly created?


The argument seems to be properly created as far as the DLLCC library is concerned:

    |oop|
    oop := Win32SystemSupport new LONG newInFixedSpace.
    oop == oop asPointerParameter

evaluates to true.





HTH,

R
-


 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: DLL&C connect debug exception

Terry Raymond

I appears the dllc primitives properly handle the CDatum,

so I think there is a bug in the #debug type checker.

 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Reinout Heeck
Sent: Monday, July 20, 2015 3:57 AM
To: [hidden email]
Subject: Re: [vwnc] DLL&C connect debug exception

 

On 7/16/2015 7:43 PM, Boris Slobodin wrote:

Terry,

 

Package is “Com- External Data Enhancements”.

 


Indeed, COM-specific but good enough I guess to see that it can be passed to C as a pointer.


Terry, the newInFixedSpace-ed object does not carry any C type information while the gcMalloc-ed variant does 'know' its type.
Can it be that the C procedure you are calling has its type defined in such a roundabout way that the runtime infrastructure (and the type checker) can no longer infer compatibility of the object pointer with the C argument type (even though/if it is valid)?


I did find out that this throws an exception:

    |oop|
    oop := Win32SystemSupport new LONG newInFixedSpace.
    Win32SystemSupport new LONG pointerType cast: oop

but then the involved method dues have a comment "Should we do better?"


R
-




-Boris

DeepCove Labs

 

From: [hidden email] [[hidden email]] On Behalf Of Terry Raymond
Sent: Thursday, July 16, 2015 10:20 AM
To: 'Reinout Heeck'; [hidden email]
Subject: Re: [vwnc] DLL&C connect debug exception

 

Where is #asPointerParameter defined? It is not in my 7.9 image.

 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 

From: [hidden email] [[hidden email]] On Behalf Of Reinout Heeck
Sent: Thursday, July 16, 2015 11:33 AM
To: [hidden email]
Subject: Re: [vwnc] DLL&C connect debug exception

 

On 7/16/2015 2:45 PM, Terry Raymond wrote:

One of my packages uses an external interface. In a recent rebuild somehow the interface

was compiled with the optimization level set to #debug. As a result, an exception occurred

during testing. The type checker flagged a function argument as not being the correct type.

 

The type is supposed to be a "long *". As I understand it, the argument can be created as;

                arg := xif LONG gcMalloc.   This sets arg to a CPointer.

We have been using;

                arg := xif LONG newInFixedSpace.  This sets arg to a CDatum.

 

When the interface is compiled with #full optiimization calling the function with the CDatum

works fine, but if the interface is compiled with #debug an exception is raised.

 

Is this a bug with the type checker or is the argument being improperly created?


The argument seems to be properly created as far as the DLLCC library is concerned:

    |oop|
    oop := Win32SystemSupport new LONG newInFixedSpace.
    oop == oop asPointerParameter

evaluates to true.





HTH,

R
-



 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 




_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc




_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Loading...