Skip Menu |

This queue is for tickets about the IPC-Shareable CPAN distribution.

Report information
The Basics
Id: 27176
Status: resolved
Priority: 0/
Queue: IPC-Shareable

People
Owner: msouth [...] gmail.com
Requestors: dan.harbin [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Cannot share a string with the words HASH, ARRAY, or SCALAR
I am sharing a scalar that contains the word 'ARRAY' in it which causes a crash. The function _is_kid of IPC::Shareable checks the variable for the string 'ARRAY' in it, and if it has that string, then it assumes it's an arrayref. This is causing a crash when it tries to coerce an array out of the scalar. I believe the proper way to handle this is to get the type from ref($data). See perldoc -f ref.
From: dan.harbin [...] gmail.com
On Thu May 17 15:06:05 2007, dlharbin wrote: Show quoted text
> I am sharing a scalar that contains the word 'ARRAY' in it which causes > a crash. The function _is_kid of IPC::Shareable checks the variable for > the string 'ARRAY' in it, and if it has that string, then it assumes > it's an arrayref. This is causing a crash when it tries to coerce an > array out of the scalar. > > I believe the proper way to handle this is to get the type from > ref($data). See perldoc -f ref.
From: dan.harbin [...] gmail.com
Oops... I am having quite a bad time with this system. I meant to say that this bug appears in 0.60, not that it is fixed in 0.60.
On Thu May 17 15:06:05 2007, dlharbin wrote: Show quoted text
> I am sharing a scalar that contains the word 'ARRAY' in it which causes > a crash. The function _is_kid of IPC::Shareable checks the variable for > the string 'ARRAY' in it, and if it has that string, then it assumes > it's an arrayref. This is causing a crash when it tries to coerce an > array out of the scalar. > > I believe the proper way to handle this is to get the type from > ref($data). See perldoc -f ref.
If you still have code using IPC::Shareable can you test with https://github.com/msouth/IPC-Shareable.git and see if it works? I fixed this bug there by using Scalar::Util::reftype, but I don't have a body of code to test against except for the original author's test suite.
Fixed in 0.61. There is no 0.61 for me to select in the dropdown, perhaps because it has just been released. Anyway--this problem should be gone if you update.