GNU bug report logs - #12753
printf in make-prime-list.c uses "modern" features

Previous Next

Package: coreutils;

Reported by: John David Anglin <dave.anglin <at> nrc-cnrc.gc.ca>

Date: Sun, 28 Oct 2012 19:43:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Pádraig Brady <P <at> draigBrady.com>
To: John David Anglin <dave.anglin <at> bell.net>
Cc: John David Anglin <dave <at> hiauly1.hia.nrc.ca>, 12753-done <at> debbugs.gnu.org
Subject: bug#12753: printf in make-prime-list.c uses "modern" features
Date: Sun, 04 Nov 2012 01:41:53 +0000
On 11/04/2012 01:19 AM, John David Anglin wrote:
> On 3-Nov-12, at 8:55 PM, Pádraig Brady wrote:
>
>> On 10/29/2012 12:22 PM, John David Anglin wrote:
>>> On 28-Oct-12, at 9:57 PM, Pádraig Brady wrote:
>>>
>>>> Is %jx not supported, or is the * not supported with %j?
>>>> I'm guessing the latter since you got a runtime issue
>>>> rather than a compile time one.  We also use '*' in
>>>> other format strings, so I doubt that's an issue in itself.
>>>
>>>
>>> I will test this evening.  The printf manpage doesn't mention %j
>>> or * in the HP-UX 10.20 and 11.11 pages.  Sometimes things
>>> are supported but not documented.
>>
>> I've now pushed the patch set from this thread,
>> so I'm marking this as done.
>
>
> As far as I can tell, your patch to make-prime-list.c works.  I'm
> currently doing a build with a hack to try fix the threads issue.
>
> The 'j' printf modifier is not supported on HP-UX at least through
> to 11.11.  GCC doesn't parse printf format strings to detect unsupported
> features.  The string "%ju" outputs "ju".  As a result, the argument
> processing messes up.  This is what causes the runtime crash.
>
> So, the other instances where %j is used need examination.
>
> Don't know about '*'.

Oh right, %j is only a runtime issue without -Wformat
Thanks for the info.

All %j should now be handled with:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=5e940180
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=1411022c

thanks,
Pádraig.




This bug report was last modified 12 years and 205 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.