Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I'm guessing based on the C parts since I don't know XS very well.

    Aren't you calloc()ing a char buffer without free()ing it.

    John.
    --
    • Yes, but perl should free that when the SvREFCOUNT reaches zero.
      • Never mind, that does indeed appear to be the culprit. How strange - I could have sworn perl free'd the strings.
        • If you did a SAVEFREEPV() on the pointer it would be added to the savestack and freed the next time the save stack was cleared.

          But you shouldn't use calloc() or other system level memory allocation routines. You should use New() or one of its variants. This is because Perl may be configured to use its own malloc routines and using the system ones at the same time could lead to issues. IOW, it might work fine for you on your box but might go disasterously wrong when built on a Perl with a different configuration.