New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ce6f496d720f6206455628425320badd95b07372 breaks float formatting under GTK #16898
Comments
From @dkCreated by @dkce6f496 changed float/double formatting The test for this is rather elaborate, so I'm attaching a localebug module * apt-get install libgtk2.0-dev (gtk development files) When running with a faulty configuration, the core issue is basically this: my $s = sprintf "%s", 4.9999; which prints just "4". The module attached can also be found at http://karasik.eu.org/misc/localebug-1.00.tar.gz Perl Info
|
From @dk |
From @dkVery similar issue (fixed in 5.20.1) https://rt.perl.org/Public/Bug/Display.html?id=122105 |
From @jkeenanOn Wed, 20 Mar 2019 18:03:23 GMT, int32 wrote:
bcc-ing relevant parties. -- |
The RT System itself - Status changed from 'new' to 'open' |
From @jkeenanOn Wed, 20 Mar 2019 18:03:23 GMT, int32 wrote:
In order to run the tests in your tarball, I would have to become the root user (or sudo) and change the default locale. I am reluctant to do that and, in any case, we have to be able to run the Perl 5 core test suite as non-root users. Could your tests be modified so that an ordinary user could run them? Thank you very much. -- |
From @dk
That's not entirely correct. You may need to become root to install the
If p5 core has already tests for another locale, simulating file access required to /dk
-- |
From @jkeenanOn Thu, 21 Mar 2019 14:28:37 GMT, int32 wrote:
Is this expected output from running the tests in your tarball (where de_DE.utf8 is available but not default)? ##### $ locale -a | grep '^de_DE.utf8' $ prove -I. -vb t/*.t Thank you very much. -- |
From @dk
Hi James, Yes indeed it is. That's how it looks when everyting is fine and there's no bug.
but when run with 'make test' it is suppressed, and is only shown on failure /dk
Hi James, -- |
From @sisyphusComplete locale numbnut here, who is puzzled at how to account for the behaviour being demonstrated. In perllocale docs I see: <quote> With the perl that Dmitry has used, Perl_strtod is simply the C library function strtod(). If so, is that what's happening here ? FYI: Cheers, |
From @dkOn Thu, Mar 21, 2019 at 08:16:52PM -0700, sisyphus@cpan.org via RT wrote:
Here's a good explanation on the similar issue: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=122105 (it's buried somewhere in the discussion). Basically Perl has the idea that it is master of setlocale(), while GTK
It seems that way to me. -- |
From @khwilliamsonOn 3/22/19 4:31 AM, Dmitry Karasik wrote:
You can start way down, at
Actually, you have it somewhat wrong. See below
See https://perldoc.pl/5.29.9/perlapi#Locale-related-functions-and-macros Perl keeps the LC_NUMERIC locale generally set to the C locale. This is But there are times when the radix character needs to be output in the I haven't looked at this ticket carefully enough to be sure, but And then there's GTK which sets the locale itself. That can't be Things are further complicated by the fact that POSIX systems have a The bottom line is you can't use a LC_NUMERIC locale-sensitive library |
From @dkOn Fri, Mar 22, 2019 at 09:53:40AM -0600, Karl Williamson wrote:
Thanks for the explanation, that makes sense. -- |
From @khwilliamsonOn Fri, 22 Mar 2019 15:11:00 -0700, int32 wrote:
Where would you have read that putting a link to perlapi for this would have shown you it existed? |
From @dkOn Sat, Mar 23, 2019 at 11:26:22AM -0700, Karl Williamson via RT wrote:
"Read" assumes active monitoring of such news, which I almost never do. -- |
From @khwilliamsonOn 3/25/19 9:30 AM, Dmitry Karasik wrote:
I meant, where in the perl docs would you have gone when you noticed the |
From @dk
I didn't go to the docs at all. My timeline was something like this: - Slaven sent a pull request for my module (Prima) to workaround perl bug in 5.20.1 that failed tests Even if I did go for the docs, I wouldn't have a slightest idea where to look For the constructive note, it might be a (probably even good) idea to issue a -- |
From @khwilliamsonOn 3/20/19 12:03 PM, Dmitry Karasik (via RT) wrote:
I tried your (thoughtfully included) test bed, making sure that perl.h But I created a branch where I wrap Perl_strtod() with calls to use the It's at |
From @dk
Hi Karl, That branch seems to be passing the tests okay -- |
From @khwilliamsonThis should be fixed by PATCH: [perl #133945] Perl_strtod failures -- |
@khwilliamson - Status changed from 'open' to 'pending release' |
From @sisyphusUnfortunately this latest commit (4ac6fab) A quick check that will catch the problem is to run something like: When nvtype is 'double, the value of 8.87359152e-6 is assigned Perhaps we should even add that test to the POSIX test suite ? Cheers, On Tue, Apr 16, 2019 at 7:53 AM Karl Williamson via RT <
|
From @khwilliamsonOn 4/15/19 8:39 PM, sisyphus wrote:
I re-inspected the patch and don't see anyway that it could have made
That sounds good.
|
From @sisyphusSomething in the last couple of days has definitely caused a reversion to This Inline::C script: reports (on all of my Windows and Linux builds) that current blead has My -Dusequadmath builds are also afflicted with the issue (as they now also Anyway - perhaps it's not your commit that's the culprit. I'll prepare and post that patch to posix.t tonight, and try to get my head Cheers, On Tue, Apr 16, 2019 at 1:50 PM Karl Williamson <public@khwilliamson.com>
|
From @jkeenanOn 4/16/19 4:53 AM, sisyphus wrote:
I can confirm this result on Linux. Is there any way your C program could be rewritten such that we get a
|
From @sisyphusJames, ##################### Cheers, On Tue, Apr 16, 2019 at 9:59 PM James E Keenan <jkeenan@pobox.com> wrote:
|
From @sisyphusI see that line 6555 of perl.h is presently: I wonder if that was meant to be: (I'll test it.) Cheers, On Tue, Apr 16, 2019 at 10:26 PM sisyphus <sisyphus359@gmail.com> wrote:
|
From @khwilliamsonOn 4/16/19 7:06 AM, sisyphus wrote:
Yes, that's the typo. But fixing it opens a can of worms. Please check it out.
|
From @jkeenanOn Tue, 16 Apr 2019 16:43:42 GMT, public@khwilliamson.com wrote:
With a perl built in the smoke-me/khw_strtod branch, I run Sisyphus's program and get: ##### Is that the expected result? Thank you very much. |
From @khwilliamsonThank you for filing this report. You have helped make Perl better. With the release today of Perl 5.30.0, this and 160 other issues have been Perl 5.30.0 may be downloaded via: If you find that the problem persists, feel free to reopen this ticket. |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#133945 (status was 'resolved')
Searchable as RT133945$
The text was updated successfully, but these errors were encountered: