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:
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 |