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
Lengthy parameter passed to eval leads to bus error on FreeBSD 5.4 #8041
Comments
From jnarron@cdsinet.netThis is a bug report for perl from jnarron@cdsinet.net, I came across this problem when not only myself, but several other
eXamining $evalstr produces an incredibly lengthy string full of #0 0x280a2144 in Perl_malloc (nbytes=25) at malloc.c:1411 This happens on line 21720 of the $evalstr, and the following was also noticed: FreeBSD 5.4 seems to have a default stack hardlimit of 64MB. Increasing This is reproducable on 2 other FreeBSD 5.4 systems. This bus error Flags: Site configuration information for perl v5.8.7: Configured by root at Mon Jul 25 16:56:21 CDT 2005. Summary of my perl5 (revision 5 version 8 subversion 7) configuration: Locally applied patches: @INC for perl v5.8.7: Environment for perl v5.8.7: |
From @iabynOn Wed, Jul 27, 2005 at 08:21:01AM -0700, jnarron @ cdsinet. net wrote:
Could you send them as a tar.gz attachment please? -- |
The RT System itself - Status changed from 'new' to 'open' |
From jnarron@cdsinet.netThe following script also produces similar results: perl -e 'my $x = q[if ($h->{ALPHA}->{BETA}->{q{stuff}}) {] . "\n" . q[ Adjusting the x= XXXX makes a bit more flexible test case. 7238 doesn't |
From shouldbedomo@mac.comOn 2005–07–27, at 20:31, John Narron wrote:
Problem confirmed with the above script on Mac OS X. The tipping Host Name: Tullamore Command: perl Version: ??? (???) PID: 2876 Exception: EXC_BAD_ACCESS (0x0001) Thread 0 Crashed: Thread 0 crashed with PPC Thread State 64: Binary Images Description: -- |
From shouldbedomo@mac.comOn 2005–07–28, at 08:51, Dominic Dunlop wrote:
Another data point: the problem's not specific to eval -- with this ./perl -e 'my $x = q[if ($h->{ALPHA}->{BETA}->{q{stuff}}) {] . "\n" . q[ -- |
From shouldbedomo@mac.comOn 2005–07–28, at 08:51, Dominic Dunlop wrote:
Attached is a comprehensive but simple-minded patch that simply stops Run embed.pl after applying the patch. Passes all tests for me both The figure of 8192 is arbitrary: it's comfortably higher than the The original report says
I think that either John must be mistaken, or FreeBSD's stackframes As the patch adds entry and exit code to a function that's called a perl-current-optimized: perl-current-patched-optimized: perl-current-optimized-threads: perl-current-patched-optimized-threads: 3% _better_ on user time for unthreaded; 2% penalty for threaded. Ah |
From @iabynOn Thu, Aug 04, 2005 at 09:52:18PM +0200, Dominic Dunlop wrote:
Perl_peep doesn't just do omptimisations; swome stuff is necessary for case OP_METHOD_NAMED:
The optimiser processes ops in the order they're normally executed. if (foo) { bar} which is the same as foo && bar; baz; the 'normal' path is foo -> baz. So peep recurses down the 'other' branch The fix would probably be to temporary set the 'done' flag on the next op -- |
From shouldbedomo@mac.comPumpking(s), please don't apply my patch, as it may be unsafe despite On 2005–08–05, at 01:46, Dave Mitchell wrote:
I wondered about stuff like that, and thought I thrashed the patch
Thanks for the insight. Time to delve into the code ... |
From jnarron@gmail.comThis has just been an incredibly odd week for me, so I haven't been Anyway, after making this bug report and doing a lot of testing, I've http://www.freebsd.org/cgi/query-pr.cgi?pr=84255 Once I changed the port patches to ensure pthread wasn't linked in, it So now, in my opinion, it appears to be something between perl 5.8.7
Wouldn't be the first time I was wrong, and I'm only human :) However, taken from /usr/src/sys/conf/NOTES: options MAXSSIZ=(128UL*1024*1024) 128*1024*1024 = 134,217,728 root:~# ulimit -s 131072 * 1024 = 134,217,728 Again, I'm no expert, never said I was, just going on what I observe. |
From jnarron@gmail.com
Got ahead of myself on this one. If you add that 'options' line to the |
From @ysthOn Fri, Aug 05, 2005 at 08:43:41AM +0200, Dominic Dunlop wrote:
FWIW, I thought making sure only optional stuff was in the optimizing Definitely worth pursuing. |
From @tonycozOn Wed, 27 Jul 2005 23:51:55 -0700, shouldbedomo@mac.com wrote:
This appears to have been largely fixed by 3c78429. Tony |
From @tonycozOn Tue, 29 Jan 2019 15:48:07 -0800, tonyc wrote:
And closing. If you have new test cases that cause similar crashes please open a new ticket. Tony |
@tonycoz - Status changed from 'open' to 'pending release' |
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#36667 (status was 'resolved')
Searchable as RT36667$
The text was updated successfully, but these errors were encountered: