pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: va_arg and netbsd-6 ...



On Mon, Jun 18, 2012 at 03:07:29PM +0200, Hauke Fath wrote:
> At 23:44 Uhr +0200 15.06.2012, Martin Husemann wrote:
> >On Fri, Jun 15, 2012 at 05:55:52PM +0200, Hauke Fath wrote:
> >> Using %jd, with and without casting the argument to intmax_t, gave me the
> >> same SIGSEV. Using %lld works, but is not backwards compatible. So it'll
> >> probably be a PRItimet format along the lines of what they do for off_t.
> >
> >Huh? You mean something like:
> >
> >   time_t t = 0;
> >   printf("%jd\n", (intmax_t)t);
> >
> >caused a SIGSEGV?
> 
> Not that simple, unfortunately. The SIGSEV happens in the following call
> 
> [sysutils/radmind command.c:658]
> 
>           snet_writef( sn, "%s %s %o %d %d %ld %" PRIofft "d %s\r\n",
>                   "f", av[ 2 ],
>                   DEFAULT_MODE, DEFAULT_UID, DEFAULT_GID,
>                   st.st_mtime, st.st_size, cksum_b64 );
> 
> -- libsnet's snet_writef() does not know %j, and the last %s then ends up
> with the MSW (likely 0) of the 64 bit st_size field.
> 
> So, not NetBSD's fault... except that a "time_t migration guide" might be
> helpful.

WTF can't they just use snprintf or asprintf? This is completely
broken...

Joerg


Home | Main Index | Thread Index | Old Index