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
"perl in malloc(): warning: recursive call" on array write + signals #1075
Comments
From larse@ISI.EDURunning the following test script causes perl to crash. You may need #!/usr/local/bin/perl -w use strict; use constant CHUNK_SIZE => 128; $| = 1; if(my $pid = fork) { Execution of this script results in the following output: [sub: ~/thesis/bin] short Please let me know if I can provide any other information to help Perl Info
|
From [Unknown Contact. See original ticket]Lars Eggert writes:
Signals and Perl do not mix. Please do not use signals if a segfault
One should not do anything as bad as that in a sighandler. What is $SIG{ALRM} = sub { ++$state ; return }; and preallocating $state = 0; Ilya |
From [Unknown Contact. See original ticket]Ilya, thanks for the quick response.
Never? After reading perlipc I was under the impression that using signals Lars |
From [Unknown Contact. See original ticket]On Mon, Jan 24, 2000 at 09:53:27PM -0800, Lars Eggert wrote:
Never. Well, I did not try XSUB signal handlers, but if it is a Perl Ilya |
From [Unknown Contact. See original ticket]On Mon, 24 Jan 2000, Lars Eggert wrote:
Our malloc can't be used in a signal handler.
Chuck Robey | Interests include C & Java programming, FreeBSD, New Year's Resolution: I will not sphroxify gullible people into looking up |
From [Unknown Contact. See original ticket]On Tue, Jan 25, 2000 at 02:44:05PM -0500, Chuck Robey wrote:
One can write a signal handler in such a way that no mallocs are going Ilya |
From [Unknown Contact. See original ticket]On Tue, 25 Jan 2000, Ilya Zakharevich wrote:
Do you know for a fact that perl, in the signal handler code, is not Chuck Robey | Interests include C & Java programming, FreeBSD, New Year's Resolution: I will not sphroxify gullible people into looking up |
From [Unknown Contact. See original ticket]On Tue, Jan 25, 2000 at 05:25:40PM -0500, Chuck Robey wrote:
$a = 0; # Prealloc the numeric slot; will not call malloc()/free()/realloc(). [At least around 5.004]. But this is easy to check. Before the programs starts to recieve binmode STDERR; or some such. Set breakpoint in Perl_pp_binmode. When hit (this way Ilya |
From @iabyn(I'm just reviewing old Perl bug reports). Since Perl 5.8.0, sygnal handling has become "safe", ie the So presumably your problem is now resolved. Regards, Dave M. |
@iabyn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#2028 (status was 'resolved')
Searchable as RT2028$
The text was updated successfully, but these errors were encountered: