|
From: Richard v. d. H. <ric...@mx...> - 2004-11-18 12:30:41
Attachments:
sprintf.patch
|
Hi, I've been doing some work on tracking down an assertion failure with Helgrind, and it turns out to be thrown whenever vgPlain_sprintf() is called with a %y conversion - because the %y conversion uses sprintf itself. The best way to fix this seems to be to make sprintf reentrant; attached is a patch to do so, using a nested function - which is of course a gcc-only extension. Is introducing a dependency on gcc a problem, or do we rely on gcc anyway? If the former, let me know, and I'll submit an alternative solution. Cheers, -- Richard van der Hoff <ric...@mx...> Systems Analyst Tel: +44 (0) 845 666 7778 http://www.mxtelecom.com |
|
From: Tom H. <th...@cy...> - 2004-11-18 12:37:07
|
In message <419...@mx...>
Richard van der Hoff <ric...@mx...> wrote:
> The best way to fix this seems to be to make sprintf reentrant;
> attached is a patch to do so, using a nested function - which is of
> course a gcc-only extension. Is introducing a dependency on gcc a
> problem, or do we rely on gcc anyway? If the former, let me know, and
> I'll submit an alternative solution.
I did take all the existing nested functions out a while back...
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: Julian S. <js...@ac...> - 2004-11-18 12:56:30
|
Yes, we are trying to do away with nested functions. Only gcc supports them, and even the gcc folks don't like them, I think. Can you fix this some other way? J On Thursday 18 November 2004 12:36, Tom Hughes wrote: > In message <419...@mx...> > > Richard van der Hoff <ric...@mx...> wrote: > > The best way to fix this seems to be to make sprintf reentrant; > > attached is a patch to do so, using a nested function - which is of > > course a gcc-only extension. Is introducing a dependency on gcc a > > problem, or do we rely on gcc anyway? If the former, let me know, and > > I'll submit an alternative solution. > > I did take all the existing nested functions out a while back... > > Tom |
|
From: Richard v. d. H. <ric...@mx...> - 2004-11-18 16:38:03
Attachments:
sprintf.patch
|
Julian Seward wrote: > Yes, we are trying to do away with nested functions. Only gcc > supports them, and even the gcc folks don't like them, I think. > Can you fix this some other way? Okay then, I'll try harder :) Let's try the attached patch against CVS HEAD - unfortunately there are a few more changes, but it does fix it properly in a thread-safe kind of way. Cheers, -- Richard van der Hoff <ric...@mx...> Systems Analyst Tel: +44 (0) 845 666 7778 http://www.mxtelecom.com |
|
From: Richard v. d. H. <ric...@mx...> - 2004-11-23 21:23:19
|
Richard van der Hoff wrote: > I've been doing some work on tracking down an assertion failure with > Helgrind, and it turns out to be thrown whenever vgPlain_sprintf() is > called with a %y conversion - because the %y conversion uses sprintf > itself. > ... > Let's try the attached patch against CVS HEAD - unfortunately there > are a few more changes, but it does fix it properly in a thread-safe > kind of way. Sorry to pester, but would it be possible to have the patch applied, or at least have some feedback, before it goes stale? I'm aware that things are busy at the moment, and that whether this code would even be in the next major release is currently questionable; however, I hope that this patch is pretty safe and should apply easily at the moment, and it would make my list of things-to-remember shorter if this fix made it into CVS. Cheers, -- Richard van der Hoff <ric...@mx...> Systems Analyst Tel: +44 (0) 845 666 7778 http://www.mxtelecom.com |