in reply to SvPV Segmentation Fault
Different platform, version and build environment, but it confirms that SvPV_nolen() should do what you think it should do:
#! perl -slw use strict; use Inline C => Config => BUILD_NOISY => 1; use Inline C => <<'END_C', NAME => '_967160', CLEAN_AFTER_BUILD => 0; void foo( SV *sv ) { if( sv ) printf( "%s\n", SvPV_nolen( sv ) ); return; } END_C foo( 'fred' ); foo( 1 ); __END__ C:\test>967160 validate Stage get_maps Stage Writing Makefile for _967160 Microsoft (R) Program Maintenance Utility Version 9.00.21022.08 Copyright (C) Microsoft Corporation. All rights reserved. C:\Perl64\bin\perl.exe C:\Perl64\lib\ExtUtils\xsubpp -typ cl -c -I"C:/test" -nologo -GF -W3 -MD -Zi -Ox -GL -fp:pr _967160.c Running Mkbootstrap for _967160 () C:\Perl64\bin\perl.exe -MExtUtils::Command -e chmod -- 644 C:\Perl64\bin\perl.exe -MExtUtils::Mksymlists -e "Mksymli link -out:blib\arch\auto\_967160\_967160.dll -dll -nologo Creating library blib\arch\auto\_967160\_967160.lib and object Generating code Finished generating code if exist blib\arch\auto\_967160\_967160.dll.manifest mt -n if exist blib\arch\auto\_967160\_967160.dll.manifest del b C:\Perl64\bin\perl.exe -MExtUtils::Command -e chmod -- 755 C:\Perl64\bin\perl.exe -MExtUtils::Command -e cp -- _96716 C:\Perl64\bin\perl.exe -MExtUtils::Command -e chmod -- 644 Microsoft (R) Program Maintenance Utility Version 9.00.21022.08 Copyright (C) Microsoft Corporation. All rights reserved. Files found in blib\arch: installing files in blib\lib into archit Installing C:\test\_Inline\lib\auto\_967160\_967160.dll Installing C:\test\_Inline\lib\auto\_967160\_967160.exp Installing C:\test\_Inline\lib\auto\_967160\_967160.lib Installing C:\test\_Inline\lib\auto\_967160\_967160.pdb fred 1 C:\test>967160 fred 1
It also works here on 5.14.2:
C:\test>\perl64-14\bin\perl.exe 967160.pl validate Stage Starting Build Preprocess Stage get_maps Stage Finished Build Preprocess Stage Starting Build Parse Stage Finished Build Parse Stage Starting Build Glue 1 Stage Finished Build Glue 1 Stage Starting Build Glue 2 Stage Finished Build Glue 2 Stage Starting Build Glue 3 Stage Finished Build Glue 3 Stage Starting Build Compile Stage Starting "perl Makefile.PL" Stage Writing Makefile for _967160 Writing MYMETA.yml and MYMETA.json Finished "perl Makefile.PL" Stage Starting "make" Stage Microsoft (R) Program Maintenance Utility Version 9.00.21022.08 Copyright (C) Microsoft Corporation. All rights reserved. C:\perl64-14\bin\perl.exe C:\perl64-14\lib\ExtUtils\xsub cl -c -I"C:/test" -nologo -GF -W3 -MD -Zi -DNDEBUG -Ox _967160.c Running Mkbootstrap for _967160 () C:\perl64-14\bin\perl.exe -MExtUtils::Command -e chmod - C:\perl64-14\bin\perl.exe -MExtUtils::Mksymlists -e "Mk link -out:blib\arch\auto\_967160\_967160.dll -dll -nolog Creating library blib\arch\auto\_967160\_967160.lib and objec Generating code Finished generating code if exist blib\arch\auto\_967160\_967160.dll.manifest mt if exist blib\arch\auto\_967160\_967160.dll.manifest del C:\perl64-14\bin\perl.exe -MExtUtils::Command -e chmod - C:\perl64-14\bin\perl.exe -MExtUtils::Command -e cp -- _ C:\perl64-14\bin\perl.exe -MExtUtils::Command -e chmod - Finished "make" Stage Starting "make install" Stage Microsoft (R) Program Maintenance Utility Version 9.00.21022.08 Copyright (C) Microsoft Corporation. All rights reserved. Files found in blib\arch: installing files in blib\lib into arch Installing C:\test\_Inline\lib\auto\_967160\_967160.dll Installing C:\test\_Inline\lib\auto\_967160\_967160.exp Installing C:\test\_Inline\lib\auto\_967160\_967160.lib Installing C:\test\_Inline\lib\auto\_967160\_967160.pdb Finished "make install" Stage Starting Cleaning Up Stage Finished Cleaning Up Stage Finished Build Compile Stage fred 1 C:\test>\perl64-14\bin\perl.exe 967160.pl fred 1
Which leaves platform and build environment to isolate, with the latter the most likely the problem I think. Perhaps you could show your build process console log?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: SvPV Segmentation Fault
by adler187 (Initiate) on Apr 25, 2012 at 21:19 UTC | |
by dave_the_m (Monsignor) on Apr 25, 2012 at 22:21 UTC | |
by adler187 (Initiate) on Apr 25, 2012 at 22:39 UTC | |
by dave_the_m (Monsignor) on Apr 25, 2012 at 23:14 UTC | |
by adler187 (Initiate) on Apr 25, 2012 at 23:20 UTC | |
by BrowserUk (Patriarch) on Apr 25, 2012 at 21:47 UTC |