|
From: <cra...@co...> - 2007-05-16 06:49:19
|
Hmm... thanks for pointing that out, I need to verify it, I thought this was fixed in 1.9 as someone pointed out in the Java version.. -------------- Original message -------------- From: Harbhanu <har...@hu...> > Hi, > I am trying to use the cursor apis to traverse the xml document.. > But its crashing the system..when I call "toRawString" for a particular > index... > > It seems the crash is due to the code in "toRawString2" .. the offset value > is not getting incremented > > I tried changing the offset modification logic to "offset++" and it > worked... > Please let me know if it is a defect or something wrong from my part. > > Regards, > Harbhanu > > |
|
From: Harbhanu <har...@hu...> - 2007-05-17 05:11:04
|
In my case the value of "offset" variable is not getting incremented...in the while loop...so its eventually leading to an out of bound access of array "s"... Does this have to do anything with endianness...?? Ps: I have to set BIG_ENDIAN macro value to 0 .if my system is little endian... right ? -----Original Message----- From: Jimmy Zhang [mailto:cra...@co...] Sent: Thursday, May 17, 2007 12:14 PM To: Harbhanu Cc: vtd...@li... Subject: Re: Problem with ..toRawString2 Can't verify the issue, toRawString2 seems to work for me... toRawString2 is called within toRawString(...)... which offset value did you incrment? ----- Original Message ----- From: "Harbhanu" <har...@hu...> To: "'Jimmy Zhang'" <cra...@co...> Cc: <vtd...@li...> Sent: Tuesday, May 15, 2007 11:28 PM Subject: Problem with ..toRawString2 > Hi, > I am trying to use the cursor apis to traverse the xml document.. > But its crashing the system..when I call "toRawString" for a particular > index... > > It seems the crash is due to the code in "toRawString2" .. the offset > value > is not getting incremented > > I tried changing the offset modification logic to "offset++" and it > worked... > Please let me know if it is a defect or something wrong from my part. > > Regards, > Harbhanu > > > |
|
From: Jimmy Z. <cra...@co...> - 2007-05-17 08:03:24
|
The CVS version of toRawString2 is below, which line do you increment the offset value? http://vtd-xml.cvs.sourceforge.net/vtd-xml/ximple-dev_c/vtd-xml/vtdNav.c?view=markup ----- Original Message ----- From: "Harbhanu" <har...@hu...> To: "'Jimmy Zhang'" <cra...@co...> Cc: <vtd...@li...> Sent: Wednesday, May 16, 2007 10:10 PM Subject: RE: Problem with ..toRawString2 > In my case the value of "offset" variable is not getting incremented...in > the while loop...so its eventually leading to an out of bound access of > array "s"... > Does this have to do anything with endianness...?? > Ps: I have to set BIG_ENDIAN macro value to 0 .if my system is little > endian... right ? > > > -----Original Message----- > From: Jimmy Zhang [mailto:cra...@co...] > Sent: Thursday, May 17, 2007 12:14 PM > To: Harbhanu > Cc: vtd...@li... > Subject: Re: Problem with ..toRawString2 > > Can't verify the issue, toRawString2 seems to work for me... > toRawString2 is called within toRawString(...)... > which offset value did you incrment? > > ----- Original Message ----- > From: "Harbhanu" <har...@hu...> > To: "'Jimmy Zhang'" <cra...@co...> > Cc: <vtd...@li...> > Sent: Tuesday, May 15, 2007 11:28 PM > Subject: Problem with ..toRawString2 > > >> Hi, >> I am trying to use the cursor apis to traverse the xml document.. >> But its crashing the system..when I call "toRawString" for a particular >> index... >> >> It seems the crash is due to the code in "toRawString2" .. the offset >> value >> is not getting incremented >> >> I tried changing the offset modification logic to "offset++" and it >> worked... >> Please let me know if it is a defect or something wrong from my part. >> >> Regards, >> Harbhanu >> >> >> > > > > |
|
From: Harbhanu <har...@hu...> - 2007-05-17 08:21:09
|
It is in line 2866.... I just tried to locate the problem(crash) and for that I replaced that with offset++. That might not be the correct fix... but surely the problem is with that line. Since, every time the value of variable "l" is less than INT_MAX and as a result the offset variable never gets incremented ... eventually leading to an out of bound access of "s".(Line 2867) -----Original Message----- From: Jimmy Zhang [mailto:cra...@co...] Sent: Thursday, May 17, 2007 4:03 PM To: Harbhanu Cc: vtd...@li... Subject: Re: Problem with ..toRawString2 The CVS version of toRawString2 is below, which line do you increment the offset value? http://vtd-xml.cvs.sourceforge.net/vtd-xml/ximple-dev_c/vtd-xml/vtdNav.c?vie w=markup ----- Original Message ----- From: "Harbhanu" <har...@hu...> To: "'Jimmy Zhang'" <cra...@co...> Cc: <vtd...@li...> Sent: Wednesday, May 16, 2007 10:10 PM Subject: RE: Problem with ..toRawString2 > In my case the value of "offset" variable is not getting incremented...in > the while loop...so its eventually leading to an out of bound access of > array "s"... > Does this have to do anything with endianness...?? > Ps: I have to set BIG_ENDIAN macro value to 0 .if my system is little > endian... right ? > > > -----Original Message----- > From: Jimmy Zhang [mailto:cra...@co...] > Sent: Thursday, May 17, 2007 12:14 PM > To: Harbhanu > Cc: vtd...@li... > Subject: Re: Problem with ..toRawString2 > > Can't verify the issue, toRawString2 seems to work for me... > toRawString2 is called within toRawString(...)... > which offset value did you incrment? > > ----- Original Message ----- > From: "Harbhanu" <har...@hu...> > To: "'Jimmy Zhang'" <cra...@co...> > Cc: <vtd...@li...> > Sent: Tuesday, May 15, 2007 11:28 PM > Subject: Problem with ..toRawString2 > > >> Hi, >> I am trying to use the cursor apis to traverse the xml document.. >> But its crashing the system..when I call "toRawString" for a particular >> index... >> >> It seems the crash is due to the code in "toRawString2" .. the offset >> value >> is not getting incremented >> >> I tried changing the offset modification logic to "offset++" and it >> worked... >> Please let me know if it is a defect or something wrong from my part. >> >> Regards, >> Harbhanu >> >> >> > > > > |