[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pnet-developers] [bugs #10706] SegFault when setting member field via C
From: |
Andre Seidelt |
Subject: |
[Pnet-developers] [bugs #10706] SegFault when setting member field via ClrField.SetValue() |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10.1 |
This mail is an automated notification from the bugs tracker
of the project: DotGNU Portable.NET.
/**************************************************************************/
[bugs #10706] Full Item Snapshot:
URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=10706>
Project: DotGNU Portable.NET
Submitted by: Andre Seidelt
On: Sun 10/17/2004 at 10:36
Category: None
Severity: 5 - Average
Item Group: None
Resolution: None
Privacy: Public
Assigned to: None
Status: Open
Summary: SegFault when setting member field via ClrField.SetValue()
Original Submission: When a null-value is set via SetValue() the VM bails out
with a SegFault. This is because the check for assignment
compatibility is done for null-value, too.
Suggested fix (sorry, no time for a propper diff-patch):
replace the following code at the end of _IL_ClrField_SetValueInternal()
objectType = ILClassToType(GetObjectClass(value));
if(!ILTypeAssignCompatible(ILProgramItem_Image(field), objectType, type))
{
ILExecThreadThrowSystem(thread, "System.ArgumentException", 0);
return;
}
/* Fetch the value, box it, and return */
if(ILTypeIsReference(type))
{
*((ILObject **)ptr) = value;
}
else
{
ILExecThreadUnbox(thread, type, value, ptr);
}
WITH
if(value == NULL) {
// if the value is NULL just set it
*((ILObject **)ptr) = value;
} else {
[the above code]
}
For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=10706>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Pnet-developers] [bugs #10706] SegFault when setting member field via ClrField.SetValue(),
Andre Seidelt <=