Branch: refs/heads/davem/cxt
  Home:   https://github.com/Perl/perl5
  Commit: 725e7d489cf6df0794c39ed191e6563a13ba90d0
      
https://github.com/Perl/perl5/commit/725e7d489cf6df0794c39ed191e6563a13ba90d0
  Author: David Mitchell <da...@iabyn.com>
  Date:   2025-05-20 (Tue, 20 May 2025)

  Changed paths:
    M util.c

  Log Message:
  -----------
  MY_CXT: don't SEGV on a 1-byte struct.

The MY_CXT mechanism allows XS code to declare a 'static' struct
which is actually per-interpreter. Behind the scenes, the memory for
this struct is allocated as the PVX buf of an SV. If the size of the
struct is 1 (e.g. '{ char foo }' ) then newSV(size-1) gets called
as newSV(0), which skips allocating a PVX buffer. SEGVs ensue.



To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to