What happened to the profile?

Robert Helling helling at lmu.de
Mon Oct 7 02:44:40 UTC 2013


On 07.10.2013, at 10:22, Linus Torvalds <torvalds at linux-foundation.org> wrote:

Linux,

> On Mon, Oct 7, 2013 at 12:23 AM, Robert Helling <helling at lmu.de> wrote:
>> 
>> https://www.dropbox.com/s/3fat0kws2isqzkc/Screenshot%202013-10-07%2009.18.23.png
>> 
>> Below is a profile with the binary I compiled on Friday, above the current master. Of course both are showing the same file. Is this intentional?
> 
> Looks like something rounds to integer values. It's probably the glib
> removal code: I suspect ascii_strtod() is buggered. It uses "atof()",
> and likely re-introduced the bug that caused us to use ascii_strtod()
> in the first place. I'm guessing you have a german locale, and thus
> have the decimal point set to ',' and then atof() parses "3.5" as "3".
> 
> That "ascii_strtod()" function really looks completely broken. It
> seems to be missing the whole "ascii" point, and instead does
> pointless things like "NaN" and "infinity" parsing. I'm guessing Dirk
> copied it from some odd source..

indeed, that is the source of the problem. Here is a patch/hack that fixes it:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: use_decimal_point.patch
Type: application/octet-stream
Size: 1730 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20131007/b6c23475/attachment.obj>
-------------- next part --------------


It replaces atof by atof_l which takes an additional locale argument where I force feed it en_US. If this is considered to be the way to go, this locale for numeric values should be allocated once and for all in some startup code (where?) and not every time we have to parse a number in an xml file as it is now.

Best
Robert



-- 
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling     Elite Master Course Theoretical and Mathematical Physics
                      Scientific Coordinator
                      Ludwig Maximilians Universitaet Muenchen, Dept. Physik
                      Phone: +49 89 2180-4523  Theresienstr. 39, rm. B339
                      http://www.atdotde.de

Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515  BB44 0820 367C 36BC 0C1D    and
DCED 37B6 251C 7861 270D  5613 95C7 9D32 9A8D 9B8F




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20131007/b6c23475/attachment.sig>


More information about the subsurface mailing list