bugDotGNU Portable.NET - Bugs: bug #2775, PNET/C Stack overflow in...

 
 

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

bug #2775: PNET/C Stack overflow in MD5HashFields on recursive union types

Submitted by:  James Michael DuPont <mdupont>
Submitted on:  Mon 10 Mar 2003 11:31:12 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Wed 12 Mar 2003 07:43:53 AM UTC, comment #1:

Duplicate of #2778, which has been fixed.

Rhys Weatherley <rweather>
Project Administrator
Mon 10 Mar 2003 11:31:12 PM UTC, original submission:

So we have a union whose field is a struct
that has a pointer to a function that points back at struct that

#878 0x08051b06 in MD5HashFields (md5=0xbfffd370, classInfo=0x40012f7c) at c_types.c:1266
1266 MD5HashType(md5, ILField_Type(field)); //<-- HERE

#879 0x080519f9 in MD5HashType (md5=0xbfffd370, type=0x40012f7c) at c_types.c:1147
1147 MD5HashFields(md5, ILType_ToValueType(type)); //<-- HERE

#880 0x08051896 in MD5HashType (md5=0xbfffd370, type=0x814585c) at c_types.c:1229
1229 MD5HashType(md5, ILType_Ref(type)); //<-- HERE

#881 0x0805198e in MD5HashType (md5=0xbfffd370, type=0x814593c) at c_types.c:1244
1244 MD5HashType(md5, ILTypeGetParamWithPrefixes(type, param)); # <-- here

#878 0x08051b06 in MD5HashFields (md5=0xbfffd370, classInfo=0x40012f7c) at c_types.c:1266
1262 if(!ILField_IsStatic(field))
1263 {
1264 name = ILField_Name(field);
1265 ILMD5Data(md5, name, strlen(name) + 1);
1266 MD5HashType(md5, ILField_Type(field)); //<-- HERE
1267 }

#879 0x080519f9 in MD5HashType (md5=0xbfffd370, type=0x40012f7c) at c_types.c:1147
1142 if(structKind != -1)
1143 {
1144 /* Hash a struct or union type */
1145 MD5HashAddChar(md5, structKind + 100);
1146 MD5HashAddName(md5, ILType_ToValueType(type));
1147 MD5HashFields(md5, ILType_ToValueType(type)); //<-- HERE
1148 MD5HashAddChar(md5, IL_META_ELEMTYPE_END);
1149 }

#880 0x08051896 in MD5HashType (md5=0xbfffd370, type=0x814585c) at c_types.c:1229
1226 case IL_TYPE_COMPLEX_PINNED:
1227 {
1228 MD5HashAddChar(md5, IL_META_ELEMTYPE_PINNED);
1229 MD5HashType(md5, ILType_Ref(type)); //<-- HERE
1230 }
1231 break;

#881 0x0805198e in MD5HashType (md5=0xbfffd370, type=0x814593c) at c_types.c:1244
1234 case IL_TYPE_COMPLEX_METHOD | IL_TYPE_COMPLEX_METHOD_SENTINEL:
1235 {
1236 unsigned long numParams;
1237 unsigned long param;
1238 MD5HashAddChar(md5, IL_META_ELEMTYPE_FNPTR);
1239 MD5HashType(md5, ILTypeGetReturnWithPrefixes(type));
1240 numParams = ILTypeNumParams(type);
1241 MD5HashAddSize(md5, (ILUInt32)numParams);
1242 for(param = 1; param <= numParams; ++param)
1243 {
1244 MD5HashType(md5, ILTypeGetParamWithPrefixes(type, param)); # <-- here
1245 }
1246 }
1247 break;

{{{
struct bar;
typedef int (* fpointer) (int , struct bar );
struct baz { int x; fpointer * foo;};
typedef int (* fbazpointer) (int , struct baz );
struct bar { fbazpointer * pfoo;};
typedef union { struct { struct baz abar; } __combined;} UNTIE;
//(null): exited with signal 11

}}}

James Michael DuPont <mdupont>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Wed 12 Mar 2003 07:43:53 AM UTCrweatherStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1