[Samba] conflict in lib/snprintf using gcc-2.95.3 on HPUX 11. 00

MCCALL,DON (HP-USA,ex1) don_mccall at hp.com
Fri Feb 8 06:37:12 GMT 2002


Hi Rene,
that's correct.
The patch that Yasuma shows prevents the core by giving a buffer for
vsnprintf to 
use, instead of "0" (as I recall the core is produced when the system tries
to resolve
the buffer address of '0') - but bottom line is, even with this the snprintf
check for 
C99 compliance should fail, and Samba should be using it's internal version
instead.
Hope this helps,
Don

-----Original Message-----
From: René Nieuwenhuizen [mailto:R.Nieuwenhuizen at cpb.nl]
Sent: Friday, February 08, 2002 5:23 AM
To: Yasuma Takeda; MCCALL,DON (HP-USA,ex1)
Cc: samba-technical at lists.samba.org
Subject: Re: [Samba] conflict in lib/snprintf using gcc-2.95.3 on HPUX
11. 00


Hi Yasuma,

You're correct: this bug caused a core-dump and should be cleaned-up. But
still HP/UX 11.00 seems to have no C99-compliant snprintf. Can you confim
this Don?

René Nieuwenhuizen

----- Original Message -----
From: "Yasuma Takeda" <yasuma at miraclelinux.com>
To: "MCCALL,DON (HP-USA,ex1)" <don_mccall at hp.com>
Cc: <R.Nieuwenhuizen at cpb.nl>; <samba-technical at lists.samba.org>
Sent: Friday, February 08, 2002 10:51 AM
Subject: Re: [Samba] conflict in lib/snprintf using gcc-2.95.3 on HPUX 11.
00


>
> Hi,
>
> > Hi Renee,
> > Well, I have been pulling 2.2.3, 2.2.3a for the past several weeks, and
> > building it on HP-UX 11.0 and 11.i consistently without this issue.  I'm
not
> > using gcc, but the HP-UX Ansi CC, and I am not able to reproduce this
issue.
> >
>
> In Samba-JP, I heard that the configure produced a core file on HP-UX 11.0
> with Ansi CC, and it was caused by the check of vsnprintf.
>
> Because I don't have HP-UX, I can't confirm the problem.
> Please check the following patch.
>
> --- configure.in.org    Fri Feb  8 18:02:43 2002
> +++ configure.in        Fri Feb  8 18:03:03 2002
> @@ -950,7 +950,7 @@
>         char buf[5];
>
>         va_start(ap, format);
> -       len = vsnprintf(0, 0, format, ap);
> +       len = vsnprintf(buf, 0, format, ap);
>         va_end(ap);
>         if (len != 5) exit(1);
>
>
> Best Regards,
>
> Yasuma Takeda <yasuma at miraclelinux.com>
>   http://www.miraclelinux.com
>   http://www.samba.gr.jp(Samba-JP)
>




More information about the samba-technical mailing list