This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/6846] Full featured printf hooks
- From: "drepper at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 10 Apr 2009 03:25:27 -0000
- Subject: [Bug libc/6846] Full featured printf hooks
- References: <20080815064110.6846.rsa@us.ibm.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From drepper at redhat dot com 2009-04-10 03:25 -------
There are two severe design flaws I found so far:
1. There should be no fixed size be associated with a modifier. With your code
a modifier identifies a specific format. That's not how modifiers work.
Instead, the size is only known by the combination of modifier and specifier.
2. Related: imagine what happens with your implementation if more than one place
inserts printf hooks and specifically for new modifiers. The user bits use
define are up for grabs by everybody. What instead should happen is that you
register a modifier (arbitrary length, BTW) and then get a bitmask back with one
bit set. This you'll have to store and interpret appropriately when the
callbacks for the specifier is called.
I have to see where this leaves us. I'll look at writing this code myself now,
so no need to revise your code.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=6846
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.