Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Sys-Mmap CPAN distribution.

Report information
The Basics
Id: 91483
Status: resolved
Priority: 0/
Queue: Sys-Mmap

People
Owner: TODDR [...] cpan.org
Requestors: kevin [...] kelphead.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.16
Fixed in: 0.17_01



Subject: SvTYPE is not always SVt_PV
I'm using this package on Ubuntu-13.10 uname -a Linux ling 3.11.0-14-generic #21-Ubuntu SMP Tue Nov 12 17:04:55 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux 0.16 This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-gnu-thread-multi (with 80 registered patches, see perl -V for more detail) I am using zoneminder-1.26.5. A modified version to track to mmap bug, just adding Info logging statements. When munmap is called, this section of code is hit: if(SvTYPE(var) != SVt_PV) { croak("variable is not a string"); return; } by adding additional information to the croak statement, I determined that var is type 7, SVt_PVMG. This causes munmap failure. I modified the code, see attached patch file svtype-fix, which seems to fix the problem. I think that we want to allow everything between SVt_PVMG and SVt_PV to be accepted as unmap. Here is output from the modified croak call, variable is not a string: 7 at /usr/share/perl5/ZoneMinder/Memory/Mapped.pm line 115. croak("variable is not a string, type is: %d", SvTYPE(var));
Subject: svtype-fix
Download svtype-fix
application/octet-stream 589b

Message body not shown because it is not plain text.

On Tue Dec 17 16:18:34 2013, https://login.ubuntu.com/+id/C8erJBX wrote: Show quoted text
> I'm using this package on Ubuntu-13.10 > > uname -a > Linux ling 3.11.0-14-generic #21-Ubuntu SMP Tue Nov 12 17:04:55 UTC > 2013 x86_64 x86_64 x86_64 GNU/Linux > 0.16 > > This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64- > linux-gnu-thread-multi > (with 80 registered patches, see perl -V for more detail) > > I am using zoneminder-1.26.5. A modified version to track to mmap bug, > just adding > Info logging statements. >
Ack! Thanks for the report and the patch. I don't get emails from here and I never remember to come here and look for reports. Sorry about that. This patch doesn't apply, and I haven't touched this code in years. It's been at least long before you submitted this patch. I have no idea why that might be. Maybe I accepted another patch and forgot that I did. Can you tell me if this is still a problem? And help me put together a test case if so? I pushed stuff up to github: https://github.com/scrottie/Sys-Mmap. I'd be glad to get you commit access to that repo if you're still interested in fixing on this poor old module. pull requests welcome too, or email to scott@slowass.net. Again, sorry for the extremely late reply.
Ahh, either I gave Todd Rinaldo co-maint on this or he let himself in (I have no idea which; I push so much garbage into my head that things leak all over) and *he* has been working on the code. Fetching his code, this patch makes a *lot* more sense. Todd, if you see this, I created github.com/scrottie/Sys-Mmap from your changes and am merging fixes in to there.
On Thu Aug 21 21:52:04 2014, SWALTERS wrote: Show quoted text
> > Ahh, either I gave Todd Rinaldo co-maint on this or he let himself in > (I have no idea which; I push so much garbage into my head that things > leak all over) and *he* has been working on the code. Fetching his > code, this patch makes a *lot* more sense. > > Todd, if you see this, I created github.com/scrottie/Sys-Mmap from > your changes and am merging fixes in to there.
Merged to the main repo. https://github.com/toddr/Sys-Mmap/commit/a8f8b3ca4cbc08092c4881a81ffcde1d6fe6df8d From a8f8b3ca4cbc08092c4881a81ffcde1d6fe6df8d Mon Sep 17 00:00:00 2001 From: Scott Walters <scott@slowass.net> Date: Thu, 21 Aug 2014 21:54:36 -0400 Subject: [PATCH] merge kevin@kelphead.org's mmunmap under zoneminder fix https://rt.cpan.org/Ticket/Display.html?id=91483 croak("variable is not a string") was hitting beccause it was being too selective with SV type for modern perls.