Re: [fpc-devel] SetString difference between Ansistring and UnicodeString
In our previous episode, Sergei Gorelkin said: Vincent, what command(s) did you use to get that log? What options were used when compiling the packages? ... forget that. The bug hunted down and fixed in r13824. It was indeed uninitialized memory, but something bad could happen only if it contained a specific value. Suggest merging it to 2.4. Trying to merge generates a conflict because the D2009 modifications also touch that like (pointer -pansichar) To keep merging doable in the future, we'd have to merge those too. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] SetString difference between Ansistring and UnicodeString
Sergei Gorelkin wrote: Sergei Gorelkin wrote: Vincent Snijders wrote: I admit these are mere hints at a possible bug, but if I were maintainer of that code, I would take another look at it. I will :-) Vincent, what command(s) did you use to get that log? What options were used when compiling the packages? ... forget that. The bug hunted down and fixed in r13824. It was indeed uninitialized memory, but something bad could happen only if it contained a specific value. Suggest merging it to 2.4. Sergei ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] SetString difference between Ansistring and UnicodeString
Vincent Snijders schreef: Vincent Snijders schreef: While running valgrind on fpcdoc, I got a warning in Maybe you are interested in the valgind output. See attachment. Another problem, that was also in the valgrind output (reading uninitialized memory): EAccessViolation : Access violation $08099882 TNODEPOOL__DESTROY, line 3304 of src/dom.pp $080BFF73 THTMLWRITER__WRITEDOC, line 3341 of dw_html.pp $08049809 CREATEDOCUMENTATION, line 267 of fpdoc.pp $08049A00 main, line 290 of fpdoc.pp Vincent ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] SetString difference between Ansistring and UnicodeString
In our previous episode, Vincent Snijders said: Vincent Snijders schreef: While running valgrind on fpcdoc, I got a warning in Maybe you are interested in the valgind output. See attachment. Another problem, that was also in the valgrind output (reading uninitialized memory): EAccessViolation : Access violation $08099882 TNODEPOOL__DESTROY, line 3304 of src/dom.pp $080BFF73 THTMLWRITER__WRITEDOC, line 3341 of dw_html.pp $08049809 CREATEDOCUMENTATION, line 267 of fpdoc.pp $08049A00 main, line 290 of fpdoc.pp Nodepool and friends use objects on non-allocated memory. It might be that valgrind doesn't understand that. I think DOM should have a define to turn that off, for debugging purposes. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] SetString difference between Ansistring and UnicodeString
Marco van de Voort schreef: In our previous episode, Vincent Snijders said: Vincent Snijders schreef: While running valgrind on fpcdoc, I got a warning in Maybe you are interested in the valgind output. See attachment. Another problem, that was also in the valgrind output (reading uninitialized memory): EAccessViolation : Access violation $08099882 TNODEPOOL__DESTROY, line 3304 of src/dom.pp $080BFF73 THTMLWRITER__WRITEDOC, line 3341 of dw_html.pp $08049809 CREATEDOCUMENTATION, line 267 of fpdoc.pp $08049A00 main, line 290 of fpdoc.pp Nodepool and friends use objects on non-allocated memory. It might be that valgrind doesn't understand that. I think DOM should have a define to turn that off, for debugging purposes. Well, this AV is from a build with gt, which seems to suggest that the nodepool is reading from uninitialized memory. I doubt that the valgrind warning is false. I admit these are mere hints at a possible bug, but if I were maintainer of that code, I would take another look at it. Vincent ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] SetString difference between Ansistring and UnicodeString
Vincent Snijders wrote: I admit these are mere hints at a possible bug, but if I were maintainer of that code, I would take another look at it. I will :-) Sergei ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] SetString difference between Ansistring and UnicodeString
Sergei Gorelkin wrote: Vincent Snijders wrote: I admit these are mere hints at a possible bug, but if I were maintainer of that code, I would take another look at it. I will :-) Vincent, what command(s) did you use to get that log? What options were used when compiling the packages? Sergei ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] SetString difference between Ansistring and UnicodeString
Sergei Gorelkin schreef: Vincent Snijders wrote: Vincent Snijders schreef: While running valgrind on fpcdoc, I got a warning in Maybe you are interested in the valgind output. See attachment. That check should be removed altogether, in both WideString and UnicodeString routines. I just checked with Delphi, it allows setstring(widestring) with data containing #0 in the middle. So having a check is Delphi-uncompatible, and also causes a performance penalty. Shall I create a bug report? Vincent ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] SetString difference between Ansistring and UnicodeString
About the naughty naughts: This is also the cause of many problems and the main cause of the ssl certificate hack: www.paypal.com\0filtyhacker.cr see ASN.1 and X509. PASCAL strings (with length before string) are for good reason part of many a specification... C strings are convienient, but many times declassified for real life work. Only because of that it is important the real specs should be adhered to. (If only because it means PASCAL and derivatives have a real and mayor contribution to real life in programming ;) ) ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] SetString difference between Ansistring and UnicodeString
Vincent Snijders wrote: Vincent Snijders schreef: While running valgrind on fpcdoc, I got a warning in Maybe you are interested in the valgind output. See attachment. That check should be removed altogether, in both WideString and UnicodeString routines. I just checked with Delphi, it allows setstring(widestring) with data containing #0 in the middle. So having a check is Delphi-uncompatible, and also causes a performance penalty. Regards, Sergei ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel