[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opengroupware-users
Subject:    Re: [OGo-Users] Fix!?? (__va_copy) [Was: PostgreSQL Exception:
From:       Adam Tauno Williams <awilliam () whitemice ! org>
Date:       2009-02-28 15:05:33
Message-ID: 1235833533.6775.11.camel () linux-m3mt
[Download RAW message or body]

On Sat, 2009-02-28 at 07:53 +0100, Sebastian Reitenbach wrote:
> Hi,
> That  PrintfFormatScanner.m, remembers me on sth. I had a crasher in ogo, on 
> 64Bit, an I have to maintain a patch for our own rpm's to fix it, problem is 
> described here:
> http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1932

I've opened <http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=2019>

> On Saturday 28 February 2009 05:16:13 Adam Tauno Williams wrote:
> > > So, boy does this look like a candidate (in PrintfFormatScanner) -
> > > <snip>
> > > if (args == NULL) {
> > >   /* We got no parameters, so we cannot resolve them anyways. If the
> > >    * string contains patterns, we should probably raise an error?
> > >    */
> > >   return format;
> > >  }
> > > </snap>
> > > - as we are getting exactly out format spec handled back to us.  If I
> > > toss an fprintf into there it gets pinged!
> > >
> > > PrintfFormatScanner for no args, returning format!
> > > %b %d %H:%M:%S ogo-webui-1.1 [16973]: Note: folder-view did not find
> > > Epoz
> > A brute force fix is this:  change "#ifdef __va_copy" in
> > PrintfFormatScanner's stringWithFormat to "#ifndef __va_copy" so instead
> > of 
> > if (args == NULL) {
> >   return format;
> >  }
> >  __va_copy(va, args);
> >  self->result = [NSMutableString stringWithCapacity:[format
> > cStringLength]];
> > [self parseFormatString:format context:&va];
> >
> >  - we get -
> >
> > va = args;
> > self->result = [NSMutableString stringWithCapacity:[format
> > cStringLength]];
> > [self parseFormatString:format context:&va];
> >
> > Should __va_copy be defined? (is it getting defined erroneously
> > somewhere?).  Or is this symptomatic of a bug elsewhere?
> >
> > Happily I don't see it used terribly many other places:
> >
> > awilliam@linux-m3mt:~/Works/OpenGroupware/libFoundation-1.1.7> grep -d
> > recurse __va_copy *
> > ChangeLog:	  use __va_copy to handle va_list arguments (needed for
> > powerpc64 port)
> > Foundation/PrintfFormatScanner.m:#ifndef __va_copy
> > Foundation/PrintfFormatScanner.m:    __va_copy(va, args);
> > Foundation/NSSet.m:#ifdef __va_copy
> > Foundation/NSSet.m:    __va_copy(va, argList);
> > Foundation/common.h:#  if defined(__va_copy) || defined(__linux__)
> > Foundation/common.h:#    define lfCopyVA(__lvar__, __avar__)
> > __va_copy(__lvar__, __avar__);
> > sope-gdl1/GDLAccess/FoundationExt/PrintfFormatScanner.m:#ifdef __va_copy
> > sope-gdl1/GDLAccess/FoundationExt/PrintfFormatScanner.m:
> > __va_copy(va, args);

-- 
OpenGroupware.org Users
users@opengroupware.org
http://mail.opengroupware.org/mailman/listinfo/users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic