LWN: Comments on "What's coming in glibc 2.10" https://lwn.net/Articles/329035/ This is a special feed containing comments posted to the individual LWN article titled "What's coming in glibc 2.10". en-us Tue, 23 Sep 2025 05:39:00 +0000 Tue, 23 Sep 2025 05:39:00 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Why the vehement objections to decimal floating-point? https://lwn.net/Articles/439205/ https://lwn.net/Articles/439205/ stevenj <div class="FormattedComment"> Your example makes no sense; the result would be computed exactly in decimal floating point.<br> <p> More generally, in essentially any case where decimal fixed point with N digits would produce exact results, decimal floating point with an N-digit significand would also produce exact results. The only sacrifice in going from fixed to (decimal) floating point is that you lose a few bits of precision to store the exponent, and in exchange you get vastly bigger dynamic range and much more sensible roundoff characteristics.<br> <p> You're certainly right that many people don't have a correct mental model of floating point, however.<br> </div> Mon, 18 Apr 2011 22:37:11 +0000 wchar_t https://lwn.net/Articles/331018/ https://lwn.net/Articles/331018/ pixelpapst <div class="FormattedComment"> <font class="QuotedText">&gt; I expect one day the idea of choosing a font based on national context will be abandoned, and the code point count will finally explode, defining one Unicode character per glyph.</font><br> <p> I agree. And I think when this happens, we just *might* see a revival of UTF-16 in Asia - in a modal form. So you wouldn't repeat the high-order surrogate when it is the same as that of the previous non-BMP character.<br> <p> This would pack these texts a bit tighter than UTF-8 or UCS-4 (can encode 10 bits per low-order surrogate), while being a bit easier to parse than all the Escape-Sequence modal encodings.<br> <p> IMHO, let's see.<br> <p> </div> Thu, 30 Apr 2009 17:27:53 +0000 Why the vehement objections to decimal floating-point? https://lwn.net/Articles/330130/ https://lwn.net/Articles/330130/ dmag Fixed-point won't loose information on simple calculations, but there is a possibility some intermediate results will saturate your representation. For example, if you square a number, add 1 and take the square root. For large numbers, the square isn't likely to be representable.<p> Floating point has the opposite problem. The intermediate calculations won't blow up, but you can lose precision even in simple cases.<p> Most people don't have a correct mental model of floating point. Floating point has a reputation for being 'lossy' because it can loose information in non-obvious ways. <pre> $ irb >> 0.1 * 0.1 - 0.01 => 1.73472347597681e-18 </pre> Sometimes the answer is to store in fixed point, but calculate in floating point (and do appropriate rounding during conversion back to fixed).<p> Sat, 25 Apr 2009 12:29:56 +0000 What's coming in glibc 2.10: XML https://lwn.net/Articles/329621/ https://lwn.net/Articles/329621/ jordanb <div class="FormattedComment"> Heh. I was cringing when I submitted that because I was sure I'd make a mistake. I thinking too hard about making sure there were commas were all in order. :P<br> </div> Wed, 22 Apr 2009 18:56:14 +0000 What's coming in glibc 2.10: XML https://lwn.net/Articles/329617/ https://lwn.net/Articles/329617/ bronson <div class="FormattedComment"> This is actually invalid JSON. You need to quote the key names:<br> <p> "hlt_bug" : false,<br> "f00f_bug" : false,<br> "coma_bug" : false,<br> <p> Even so, I'd still much rather work with JSON than XML!<br> </div> Wed, 22 Apr 2009 18:51:44 +0000 What's coming in glibc 2.10: XML https://lwn.net/Articles/329557/ https://lwn.net/Articles/329557/ jordanb <div class="FormattedComment"> Of course that looked nicer before lwn nuked my whitespace but you get the idea.<br> </div> Wed, 22 Apr 2009 16:11:09 +0000 What's coming in glibc 2.10: XML https://lwn.net/Articles/329547/ https://lwn.net/Articles/329547/ jordanb <div class="FormattedComment"> JSON was designed to be a pure subset of Javascript so they could<br> market it for web development as a way to send data out to your<br> client-side JS by simply serializing JSON objects into &lt;script&gt;<br> tags in the webpage. That's the only reason for the focus on<br> Javascript -- not to rely on the ECMAScript standard. In fact the<br> only reference to ECMAScript is informational:<br> <p> "JavaScript Object Notation (JSON) is a text format for the<br> serialization of structured data. It is derived from the object<br> literals of JavaScript, as defined in the ECMAScript Programming<br> Language Standard, Third Edition [ECMA]." <br> <p> The standard is so small because it only has six data<br> types ('object' (essentially associative array), list, number,<br> boolean, string, and 'null'). It has no ability to do node<br> attributes and is only tree-based to the extent that objects and<br> arrays can contain more of them. It is certianly not a rival to<br> XML for dealing with large scale or very complicated or nuanced<br> data. But it is an excellent alternative when you have small<br> amounts of structured data that you wish to serialize.<br> <p> Another advantage of JSON is that if you have simple mostly<br> tabular datasets they can be serialized (with judicious use of<br> whitespace) in a manner that's both machine and<br> human-readable. For fun and as an example I decided to 'encode'<br> my /proc/cpuinfo in JSON:<br> <p> [{<br> processor : 0,<br> vendor_id : "GenuineIntel",<br> cpu_family : "6",<br> model : "8",<br> model_name : "Pentium III (Coppermine)",<br> stepping : 1,<br> cpu_MHz : 498.283,<br> cache_size : [ 262144, "256 KB" ],<br> fdiv_bug : false,<br> hlt_bug : false,<br> f00f_bug : false,<br> coma_bug : false,<br> fpu : true,<br> fpu_exception : true,<br> cpuid_level : 2,<br> wp : true,<br> flags : [ "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce", "cx8",<br> "sep", "mtrr", "pge", "mca", "cmov", "pat", "pse36", "mmx", "fxsr", "sse", "up" ],<br> bogomips : 997.69,<br> clflush_size : 32<br> }]<br> <p> </div> Wed, 22 Apr 2009 16:09:58 +0000 What's coming in glibc 2.10: XML https://lwn.net/Articles/329499/ https://lwn.net/Articles/329499/ dlang <div class="FormattedComment"> the JSON spec is defining a subset of javascript. does it really fully define everything in it? or does it refer you to the main javascript definitions for the gory details and corner cases?<br> </div> Wed, 22 Apr 2009 04:15:55 +0000 What's coming in glibc 2.10: XML https://lwn.net/Articles/329452/ https://lwn.net/Articles/329452/ jordanb <div class="FormattedComment"> I haven't read it in its entirety. It does seem to be well written, I'll agree to that. <br> <p> The JSON spec is terse but it also rigorously defines the syntax of a very simple data serialization format. There are no omissions that make it incomplete. This is the advantage of JSON for simple data serialization tasks. <br> </div> Tue, 21 Apr 2009 21:56:43 +0000 What's coming in glibc 2.10: XML https://lwn.net/Articles/329304/ https://lwn.net/Articles/329304/ bvdm <div class="FormattedComment"> Have you read it? It is wonderfully complete and quite educational. If the JSON spec was as well written it would probably be about 3/4 the length.<br> </div> Tue, 21 Apr 2009 04:24:16 +0000 wchar_t https://lwn.net/Articles/329285/ https://lwn.net/Articles/329285/ xoddam <div class="FormattedComment"> On the other hand, pinyin is pretty much universal on the mainland, often as a way of specifying regional or personal pronunciation.<br> <p> Vietnam has successfully switched (almost) entirely from han tu to the Latin alphabet, albeit with a forest of diacritics. Chinese might one day do the same, but it's unlikely since there is such a variety of Chinese speech and usage. Unlike Vietnamese, Chinese national identity has never been a matter of shared pronunciation.<br> <p> Both pinyin and bopomofo have some chance of evolving to make it possible to write both pronunciation and semantics reproducibly in the same representation, but neither is likely to become a universal replacement for hanzi, since they lose the advantage (not meaningfully damaged by the Simplified/Traditional split) that the several very different Chinese languages become mutually intelligible when written down.<br> <p> Universal alphabetisation of Chinese won't be possible until the regional differences become better acknowledged, so people learn literacy both in their first dialect and in the "standard" language(s).<br> <p> As for the relatively low count of "unique" symbols -- the whole idea of unifying hanzi and the Japanese and Korean versions using the common semantics to reduce the required code space and "assist" translations and text searches has met great resistance, especially in Japan, and despite it there are now nearly 100,000 distinct characters defined in Unicode. 16 bits was always a pipe dream.<br> <p> It is ultimately necessary (ie. required by users) to represent distinct glyphs uniquely; Unicode still doesn't satisfy many users precisely because it tries not to have too many distinct code points; probably it never will.<br> <p> I expect one day the idea of choosing a font based on national context will be abandoned, and the code point count will finally explode, defining one Unicode character per glyph.<br> <p> </div> Tue, 21 Apr 2009 01:19:52 +0000 wchar_t https://lwn.net/Articles/329278/ https://lwn.net/Articles/329278/ xoddam <div class="FormattedComment"> wchar_t is 32-bit by default in g++ and in the stddef.h usually used by gcc.<br> <p> There is a g++ compiler option -fshort-wchart to change the intrinsic type in C++, and you can use alternative headers or pre-define "-D__WCHAR_T__=uint16_t" for C, but this is pretty unusual on Linux except when cross-compiling for another platform (or building WINE).<br> </div> Tue, 21 Apr 2009 00:25:57 +0000 corbet trolling https://lwn.net/Articles/329276/ https://lwn.net/Articles/329276/ xoddam <div class="FormattedComment"> Corbet is indeed trolling and he's got us all going ...<br> <p> But when is Drepper going to come down amongst us in person and tell us IT ISN'T SO?<br> </div> Tue, 21 Apr 2009 00:01:45 +0000 What's coming in glibc 2.10: XML https://lwn.net/Articles/329263/ https://lwn.net/Articles/329263/ nix <div class="FormattedComment"> Of *course* it's going to produce XML by concatenating strings, but I see <br> no reason why it has to be 'broken'. It's not as if it's going to be doing <br> fully general-purpose data-&gt;XML transformation: its emitting *one <br> structure* with contents fully controlled by the libc.<br> <p> </div> Mon, 20 Apr 2009 22:42:31 +0000 What's coming in glibc 2.10 https://lwn.net/Articles/329262/ https://lwn.net/Articles/329262/ nix <div class="FormattedComment"> Are there *any* libraries or protocols with similar binary compatibility <br> guarantees? (Other than X, whicih is having similar problems: there's no <br> way *it* can use XML over the wire, but it's recently had to <br> introduce 'generic events' because it's run out of spare events...)<br> <p> </div> Mon, 20 Apr 2009 22:25:46 +0000 Who is going to read this information anyway? https://lwn.net/Articles/329239/ https://lwn.net/Articles/329239/ jkohen <div class="FormattedComment"> In this case there is really no excuse to go with XML. Even something like /proc/meminfo is more readable to a human than structured markup.<br> <p> If you want structured data ready for human consumption, you probably need to write a user-space tool, in which case using XML is no better than protocol buffers, JSON and so on; it just has a more complicated spec.<br> </div> Mon, 20 Apr 2009 19:41:43 +0000 What's coming in glibc 2.10 https://lwn.net/Articles/329236/ https://lwn.net/Articles/329236/ jkohen <div class="FormattedComment"> Any library intended to write data in XML form, naturally. You can however find much more creative uses of XML at the TheDailyWTF.com. Sadly, now I wouldn't be surprised to see glibc popping up there soon.<br> </div> Mon, 20 Apr 2009 19:36:22 +0000 What's coming in glibc 2.10: XML https://lwn.net/Articles/329232/ https://lwn.net/Articles/329232/ jordanb <p>You must live in a different universe than me if you think <a href="http://www.w3.org/TR/xml/">this</a> is a small spec.</p> <p>Do you work in aerospace perhaps?</p> <p>Compare that to <a href="http://www.ietf.org/rfc/rfc4627.txt?number=4627">the JSON spec</a>, weighing in at all of eight pages. I doubt it'd take more than 100 lines of code for a fully compliant recursive descent parser. And writing an encoder would be just about as easy.</p> <p>Which makes me wonder if they're *really* including a fully compliant XML encoder into the libc just to spit out a few lines of structured data, or if glibc is going to be joining the long line of shitty systems that produce broken XML by concatenating strings.</p> Mon, 20 Apr 2009 19:26:19 +0000 wchar_t https://lwn.net/Articles/329225/ https://lwn.net/Articles/329225/ proski It's already happening in Taiwan: <a href="http://en.wikipedia.org/wiki/Bopomofo">http://en.wikipedia.org/wiki/Bopomofo</a> Mon, 20 Apr 2009 18:55:52 +0000 Why the vehement objections to decimal floating-point? https://lwn.net/Articles/329164/ https://lwn.net/Articles/329164/ stevenj <div class="FormattedComment"> (By "result of each calculation is exactly representable" I am of course including intermediate calculations. Note that this is equally true in fixed-point and integer arithmetic.)<br> </div> Mon, 20 Apr 2009 16:34:11 +0000 Why the vehement objections to decimal floating-point? https://lwn.net/Articles/329152/ https://lwn.net/Articles/329152/ stevenj A lot of people here are proposing that decimal fixed point is just as good or better than decimal floats. <p>I'm a little skeptical of this, based on my experience with scientific computation: there are many, many circumstances when both the input and output of the computation appear to be in a range suitable for fixed-point representation, but the intermediate calculations will have vastly greater rounding errors in fixed point than in floating point. And fixed-point error analysis in the presence of rounding and overflow is a nightmare compared to floating point. <p>Decimal floating point gives you the best of both worlds. If the result of each calculation is exactly representable, it will give you the exact result. (Please don't raise the old myth that floating-point calculations add some mysterious random noise to each calculation!) There is no rounding when decimal inputs are entered, so human input is preserved exactly. And if the result is not exactly representable, its rounding characteristics will be much, much better than fixed point. (And don't try to claim that financial calculations never have to round.) <p>Note that the IEEE double-precision (64-bit) decimal-float format has a 16 decimal-digit significand (and there is also a quad-precision decimal float with a 34 decimal-digit significand). I would take this over 64-bit fixed point any day: only nine bits of this are sacrificed in IEEE to give you a floating decimal point and fixed relative precision over a wide dynamic range. Mon, 20 Apr 2009 16:31:59 +0000 What's coming in glibc 2.10: XML https://lwn.net/Articles/329139/ https://lwn.net/Articles/329139/ iabervon <div class="FormattedComment"> I think it's weirder that glibc will be outputting a big string than that the string will be XML. What I think would be more sensible is if it output a data structure that looked like something you might get by parsing XML (ignoring comments, irrelevant whitespace, details of how characters were written, etc). That is, it would be a struct with a name, an array of attribute keys and values, an array of children, and a string for character data.<br> <p> This would have the same extensibility benefits as XML, but avoid most of the parsing overhead. (Of course, the main practical extensibility benefit comes from using ASCII decimal strings of arbitrary length for numbers, which then requires a bit of parsing.)<br> <p> </div> Mon, 20 Apr 2009 15:33:06 +0000 What's coming in glibc 2.10: XML https://lwn.net/Articles/329134/ https://lwn.net/Articles/329134/ drag <div class="FormattedComment"> Well ya.. XML is simple. Angle-y brackets and a few other small things then your done.<br> <p> <p> I don't know why people are getting excited about this. Mallocinfo seems to me to be a very poorly designed part of the POSIX spec and, like the blog entry said, is dependent on the specifics of a particular malloc implimentation.<br> <p> The particular Mallocinfo in the spec is so widly useless for any sort of modern system that there is just no 'right' way to do it.<br> <p> So since it's returning statistica data that are dependent on a particular internal inplimentation then the sort of statistics that are relevent to anybody are going to change based on the changes of Malloc. <br> <p> So instead of requiring application designers to use some sort of custom parser or try to read data whose relevence and meaning, at any point in the future, can and will change he has decided to go with a very commonly used, standard, self-describing format... which is XML.<br> <p> Makes sense to me.<br> </div> Mon, 20 Apr 2009 15:07:06 +0000 wchar_t https://lwn.net/Articles/329117/ https://lwn.net/Articles/329117/ mrshiny <div class="FormattedComment"> Chinese has only about 410 unique syllables (2050 if you include tones). There are thousands of words and many sentences which, even if tones are properly conveyed, are ambiguous. I would be surprised if the current romanizations replaced Chinese characters. I would be less surprised to see an alphabet arise instead, much like what the Japanese have.<br> </div> Mon, 20 Apr 2009 13:33:02 +0000 What's coming in glibc 2.10 https://lwn.net/Articles/329114/ https://lwn.net/Articles/329114/ oseemann <div class="FormattedComment"> Are there any other libraries that return a buffer with XML data to the caller instead of a C struct?<br> </div> Mon, 20 Apr 2009 12:13:18 +0000 What's coming in glibc 2.10: XML https://lwn.net/Articles/329106/ https://lwn.net/Articles/329106/ alankila <div class="FormattedComment"> Don't overlook the possibility that this decision is a harbinger for using less binary structs in glibc's API, and more XML. Could happen.<br> <p> I think it's quite safe to assume that Ulrich means "text with angle brackets" rather than the entirety of XML specification. In other words, even a crude parser is likely to work...<br> </div> Mon, 20 Apr 2009 10:43:56 +0000 wchar_t https://lwn.net/Articles/329097/ https://lwn.net/Articles/329097/ tialaramex <div class="FormattedComment"> You don't need a Unicode string type in C, and it's probably a mistake to ask for one to be built into C++ (but I can't tell, maybe C++ standardisation is about trying to /collect/ mistakes at this point).<br> <p> wchar_t is a legacy of the mistaken belief that Unicode was (as some documents from a decade or more ago declared) the encoding of all world symbols into a 16-bit value. Once UCS-2 was obsolete, wchar_t was obsolete too, don't use it. Use UTF-8 on the wire, on disk and even in memory except when you're doing heavyweight character processing, and then use UTF-32, ie uint32_t or at a pinch (since the tops bits are unused anyway) int.<br> <p> The only real non-legacy argument for UTF-16 was that it's less bytes than UTF-8 for texts in some writing systems, notably Chinese. But the evidence of the last couple of decades is that the alphabetic and syllabic writing systems will eat the others alive, the majority of the world's population may yet be speaking Chinese in our lifetimes, but if so they'll write it mostly in Roman script destroying UTF-16's size advantage.<br> </div> Mon, 20 Apr 2009 08:37:29 +0000 Why the vehement objections to decimal floating-point? https://lwn.net/Articles/329096/ https://lwn.net/Articles/329096/ epa <blockquote>64-bit integers are adequate to deal with most banking and financial calculations today.</blockquote>Not all numbers used in finance are integers. Consider exchange rates and interest rates, for a start. If you were particularly perverse you could decide to use 64-bit ints for everything, with some way of encoding the number of decimal places (or binary places), but in that case you have effectively reinvented a floating point math library. <blockquote>Decimal floats are symptomatic of poor design.</blockquote>Not at all. They are often the best match to what the user and the rest of the world requires. It is accepted that 1/3 gives a recurring decimal .333... but no accountant wants their computer system to introduce rounding errors, no matter how minute, when calculating 1/5 (which is .0011... in binary). Or do you mean that *floating* point decimal is a bad idea, and it's better to use fixed point with a certain fixed number of digits precision? There is certainly a case for that. Mon, 20 Apr 2009 08:25:45 +0000 What's coming in glibc 2.10 https://lwn.net/Articles/329095/ https://lwn.net/Articles/329095/ bvdm <div class="FormattedComment"> No, I think a REST-style Web 2.0 enabled solution will work better..<br> <p> LOL<br> </div> Mon, 20 Apr 2009 07:37:43 +0000 What's coming in glibc 2.10 https://lwn.net/Articles/329088/ https://lwn.net/Articles/329088/ xorbe <div class="FormattedComment"> I was hoping that glibc would upload the data to the localhost MySQL server at runtime, and then my program could query the results back...<br> </div> Mon, 20 Apr 2009 04:31:08 +0000 Why the vehement objections to decimal floating-point? https://lwn.net/Articles/329085/ https://lwn.net/Articles/329085/ ringerc <p>Generic rationals can be a screaming nightmare to work with. Rationals are OK if you use a fixed denominator for the type and are really careful about the sorts of calculations you perform and the ordering of those calculations. They're still a pain, just not as bad as variable-denominator rationals.</p> <p>It seems to generally be quite sufficient to use double precision floating-point for this sort of thing. You just have to ensure you're running in strict IEEE floating point mode, trap floating point exceptions, and allow enough precision that you have at least a couple of significant figures of breathing room.</p> <p>I've been fairly happy with PostgreSQL's `DECIMAL' type. It's a fixed-precision base-10 decimal that's REALLY nice to work with:</p> <pre> test=# SELECT (DECIMAL '100000000000000000000.0' + DECIMAL '0.0000000000100000000000000001') * DECIMAL '4.0' AS result; result ----------------------------------------------------- 400000000000000000000.00000000004000000000000000040 test=# SELECT DECIMAL '400000000000000000000.0000000000000000000000000000000000000000000000000000040' / DECIMAL '1.1' AS result2; result2 ------------------------------------------------------------------------------- 363636363636363636363.6363636363636363636363636363636363636363636363636363673 (1 row) </pre> <p>Having something like this in the core C language specification would be quite delightful.</p> <p>(Of course, on a random and unrelated rant: a proper unicode string type would be a HUGE improvement to C/C++. The poorly-specified, painful to work with wchar_t with its variation across platforms and implementations, and its total lack of associated encoding conversion functions doesn't really do the job. Let's not even talk about std::wstring .)</p> <p>Anyway ... I'd actually be really interested in some good references on numeric type choice and proper calculation methods in financial applications.</p> Mon, 20 Apr 2009 01:47:42 +0000 Why the vehement objections to decimal floating-point? https://lwn.net/Articles/329081/ https://lwn.net/Articles/329081/ mgb <div class="FormattedComment"> 64-bit integers are adequate to deal with most banking and financial calculations today. Currencies are generally denoted in cents or mills, although the Zimbabwean dollar might more appropriately be denoted in billions.<br> <p> 128-bit floats can be used to store very large integers today and pure 128-bit integers are waiting in the wings.<br> <p> Decimal floats are symptomatic of poor design.<br> </div> Mon, 20 Apr 2009 01:01:34 +0000 Why the vehement objections to decimal floating-point? https://lwn.net/Articles/329080/ https://lwn.net/Articles/329080/ tbrownaw <blockquote> <p>My understanding was that decimal floating point is actually extraordinarily useful in circumstances like banking and accounting where human inputs (which are invariably in decimal) have to be preserved exactly, but the range of fixed-point representations is too narrow.</p> </blockquote> <p>I thought that with money you always wanted high-precision <em>fixed</em>-point with hard errors on numeric overflow, such as "15 digits with two of them after the decimal point". Floating point anything would mean that when you got enough dollars your cents would start getting rounded off, so what I understand is typically done is to use rationals with a fixed denominator of 100 (or whatever your money system uses).</p> Mon, 20 Apr 2009 00:43:30 +0000 What's coming in glibc 2.10: XML https://lwn.net/Articles/329079/ https://lwn.net/Articles/329079/ bvdm <div class="FormattedComment"> Wowa! Hold on already...<br> <p> The XML world is a huge alphabet soap, but the XML spec itself (which does *not* include namespaces) is pretty small. Why require a JSON parser if most applications already have an XML dependency?<br> </div> Mon, 20 Apr 2009 00:33:21 +0000 Who is going to read this information anyway? https://lwn.net/Articles/329078/ https://lwn.net/Articles/329078/ xoddam <div class="FormattedComment"> Heap implementation and performance details are not the sort of thing an application can hope to comprehend and adapt to on the fly. I would expect this information to be examined only by developers (often after the fact eg. in logs depicting memory pressure in a production system experiencing performance problems or horrible OOM events), who might prefer a more human-readable representation but shouldn't be afraid of XML in the case of a complex hierarchical heap structure.<br> </div> Mon, 20 Apr 2009 00:27:47 +0000 Why the vehement objections to decimal floating-point? https://lwn.net/Articles/329075/ https://lwn.net/Articles/329075/ stevenj <blockquote>Certain special interest groups subverted the standardization process (again) and pressed through changes to introduce in the C programming language extensions to support decimal floating point computations. 99.99% of all the people will never use this stuff and still we have to live with it.</blockquote> <p>My understanding was that decimal floating point is actually extraordinarily useful in circumstances like banking and accounting where human inputs (which are invariably in decimal) have to be preserved exactly, but the range of fixed-point representations is too narrow. (And good arguments have been made by various people with long experience in floating-point arithmetic, such as Kahan, that decimal floating point's elimination of rounding in binary-decimal conversion will eliminate a lot of silly errors in other fields too, and hence should become the norm as long as the speed is adequate.) And the latest revision of IEEE-754 describes an efficient way to encode decimal floating point into binary, with the possibility of future hardware support as well, so C is being revised to support this capability. <p>So why is Drepper digging in his heels? Mon, 20 Apr 2009 00:25:47 +0000 What's coming in glibc 2.10 https://lwn.net/Articles/329073/ https://lwn.net/Articles/329073/ foom <div class="FormattedComment"> Indeed, it seems to me that a sysctl-like API would make more sense.<br> </div> Sun, 19 Apr 2009 23:50:27 +0000 What's coming in glibc 2.10 https://lwn.net/Articles/329071/ https://lwn.net/Articles/329071/ jreiser <i>... a function pointer to a function that takes no argument and returns the real function pointer to use ...</i> <p>It would be useful to have some parameters: a pointer to the symbol table entry for the symbol in question (and the string table, ...), and a pointer to the dynamic linker context (search path: chain of struct link_map *) that applies. Then the same intercepting function could handle multiple names (there are many str* and mem* functions, for instance) and might be able to handle better some special cases such as compatibility matching, etc. Sun, 19 Apr 2009 22:55:37 +0000 What's coming in glibc 2.10 https://lwn.net/Articles/329069/ https://lwn.net/Articles/329069/ oak <div class="FormattedComment"> Both are needed. Mallinfo tells whether the process is fragmenting its <br> heap. Checking that may be a performance issue, so needing to parse XML <br> sounds strange. And if Glibc does allocs for the XML output, it would be <br> even stranger...<br> <p> </div> Sun, 19 Apr 2009 22:30:37 +0000 What's coming in glibc 2.10 https://lwn.net/Articles/329068/ https://lwn.net/Articles/329068/ nix <div class="FormattedComment"> It isn't a separate context. It's more like injecting code into the <br> implicit first call into the dynamic linker that happens the first time <br> any given symbol is referenced[1]. The security context is unchanged: all <br> the dynamic linker normally does is relocate that PLT entry. It's just <br> that now you can have it pick *what* to relocate first. It's no more done <br> in a different context than is calling a function through a function <br> pointer: that's all it really is.<br> <p> (hm, and it looks like it might become STT_IFUNC in time and not be <br> GNU-specific after all. Even better.)<br> <p> <p> [1] an oversimplification: actually that implicit call happens the first <br> time a PLT entry is jumped to, but that's nearly the same thing...<br> <p> </div> Sun, 19 Apr 2009 22:15:58 +0000