Mon Sep 26 16:37:06 2011: Request 71177 was acted upon.
Transaction: Correspondence added by use...@zip.com.au
       Queue: Wx
     Subject: Re: [rt.cpan.org #71177] segv on passing undef
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: use...@zip.com.au
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=71177 >


"Steve Cookson via RT" <bug...@rt.cpan.org> writes:
>
> NULL Meaning ""?

No I was looking at helpers.cpp

void* wxPli_sv_2_object( pTHX_ SV* scalar, const char* classname )
{
    // is it correct to use undef as 'NULL'?
    if( !SvOK( scalar ) )
    {
        return NULL;
    }

where undef from perl becomes NULL and wondered if that NULL is allowed
when reaching the actual wx routine.  (And then to hope the wrappers
might guard against it to avoid trouble.)

But I say that only from nosing around, though gdb does report the segv
as being from a null,

0xb74013f2 in wxObject::Ref(wxObject const&) ()
   from /usr/lib/libwx_baseu-2.8.so.0
(gdb) where
#0  0xb74013f2 in wxObject::Ref(wxObject const&) ()
   from /usr/lib/libwx_baseu-2.8.so.0
#1  0xb7a83591 in XS_Wx__AboutDialogInfo_SetIcon ()
   from /usr/lib/perl5/auto/Wx/Wx.so
#2  0x080e3c63 in Perl_pp_entersub ()
#3  0x080db232 in Perl_runops_standard ()
#4  0x08081db1 in perl_run ()
#5  0x080657af in main ()

which is

=> 0xb74013f2 <+34>:    mov    0x4(%edi),%eax

with %edi containing 0.

Reply via email to