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
Invalid read of size 8 in S_parse_body (perl.c:2166) when argv ends with -- #15647
Comments
From @ninerCreated by @ninerThis is a bug report for perl from nine@detonation.org, ----------------------------------------------------------------- Noticed by valgrinding Inline::Perl5 which embeds perl in Perl 6. Perl Info
|
From @tonycozOn Fri Oct 07 07:35:10 2016, nine@detonation.org wrote:
I haven't been able to reproduce this. I tried: - a default + -DDEBUGGING build of blead (system gcc, 4.9.2) - a default + -DDEBUGGING build of 5.24.0 (system gcc) - a build of 5.24.0 with your switches. (system gcc) - a build of 5.24.0 with your switches. (gcc 5.2.0) Could you please provide a backtrace of the failure? I also checked whether valgrind is passing the -- through, first I started $ LD_LIBRARY_PATH=. valgrind --vgdb=full --vgdb-stop-at=startup ./perl -e 0 -- Then connected to it with the debugger and valgrind finished with no errors: ==16307== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Tony |
The RT System itself - Status changed from 'new' to 'open' |
From @tonycoz
Looking at this a bit more closely, I suspect this is a bug in Inline::Perl5 For perl -e 0 --, argv and argv contain the following: argc = 4 argv[0] = "perl" # or something similar Tony |
From @ninerHi! On Mittwoch, 26. Oktober 2016 17:18:55 CET Tony Cook via RT wrote:
Oh, thank you for pointing that out and sorry for wasting your time. Valgrind Thanks again! |
From @ninerargv_null_termination.diffdiff --git a/pod/perlembed.pod b/pod/perlembed.pod
index 7bc7a8c..1c971c3 100644
--- a/pod/perlembed.pod
+++ b/pod/perlembed.pod
@@ -211,6 +211,9 @@ Also notice that no matter what arguments you pass to perl_parse(),
PERL_SYS_INIT3() must be invoked on the C main() argc, argv and env and
only once.
+Mind that argv[argc] must be NULL, same as those passed to a main
+function in C.
+
Now compile this program (I'll call it I<interp.c>) into an executable:
% cc -o interp interp.c `perl -MExtUtils::Embed -e ccopts -e ldopts`
|
From @tonycozOn Thu, 03 Nov 2016 12:07:00 -0700, nine@detonation.org wrote:
Applied as 54c85bb and added your 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.26.0, this and 210 other issues have been Perl 5.26.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#129826 (status was 'resolved')
Searchable as RT129826$
The text was updated successfully, but these errors were encountered: