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?


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?


In reply to Re: SvPV Segmentation Fault by BrowserUk
in thread SvPV Segmentation Fault by adler187

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.