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
Embedded Perl crash (5.26.1) when trying to read ERRSV - Linux (CentOS 7.5) #16562
Comments
From Lee.Staniforth@synchronoss.comHi, Perl Debug, Here's a snippet of the code:
Prior to this we initialise the Perl system, via calls to PERL_SYS_INIT(), perl_construct(), perl_parse(), perl_run() and PERL_SET_CONTEXT(). I'm aware that ERRSV is a macro, which is based on PL_errgv. I know this should be initialised after calling perl_parse() (specifically in S_init_main_stash()) Sometimes, the application crashes when accessing ERRSV, and this happens when the value is NULL. My question is have any of the Perl developers experienced this issue? This does not happen with Perl 5.22.0, or Perl 5.22.4. Thanks in advance :-) Here's the output of perlbug -d for the 5.26.1 setup: Flags: Site configuration information for perl 5.26.1: Configured by root at Mon Feb 5 13:59:36 GMT 2018. Summary of my perl5 (revision 5 version 26 subversion 1) configuration: Platform: @INC for perl 5.26.1: Environment for perl 5.26.1: |
From @iabynOn Fri, May 18, 2018 at 07:49:47AM -0700, Lee Staniforth (via RT) wrote:
I haven't looked very hard, but I notice you perl is built with threading However, in your function which uses ERRSV, I can't see any usage of -- |
The RT System itself - Status changed from 'new' to 'open' |
From Lee.Staniforth@synchronoss.comHi, Dave,
My application has other functions that configure the perl system, so these are the initialisation calls snippets: PERL_SET_CONTEXT(my_perl); SV *err_tmp; Thanks |
From Lee.Staniforth@synchronoss.comHi, lees: MDS. Before perl_parse() my_perl=@▒▒ (Address=0xD35528) Here's my code snippet, from my application (MDS): And similar code in perl_parse: So, the address of my_perl has changed from 0xD35528 to 7ffed1a010c8 Here's how I declare my_perl in my code: This is perl_alloc(): /* Newx() needs interpreter, so call malloc() instead */ S_init_tls_and_interp(my_perl); return my_perl; Putting some PerlIO_stdoutf() around that caused issues in that the make crashed, but it looks as though the code returns on this line: I will build a debug version of libperl now to investigate further, but it doesn't make sense... The address should be consistent inside the libperl functions as outside. My application is built as debug. Lee |
From @tonycozOn Sat, May 19, 2018 at 03:52:35PM +0100, Dave Mitchell wrote:
I don't see dSP either (for PUTBACK/SPAGAIN), I suspect they're being Tony |
From @tonycozOn Mon, 21 May 2018 17:46:36 -0700, Lee.Staniforth@synchronoss.com wrote:
From what you're saying you added that code to perl_parse in The important thing is the value of my_perl, not its address. Unfortunately I can't see the cause of your problem, a complete test case might help, though I suspect your code is considered proprietary. Tony |
Migrated from rt.perl.org#133214 (status was 'open')
Searchable as RT133214$
The text was updated successfully, but these errors were encountered: