Skip Menu |

This queue is for tickets about the Linux-Smaps CPAN distribution.

Report information
The Basics
Id: 82131
Status: resolved
Priority: 0/
Queue: Linux-Smaps

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

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



Subject: Constructor does not die if process cannot be accessed
The following script, executed as a non-privileged user, gives a strange error message: #!/usr/bin/perl use strict; use Linux::Smaps; my $ls = eval { Linux::Smaps->new(1) } or die "Can't construct L::S object for pid=1: $@"; $ls->size; __END__ The error message is (at least on Debian/squeeze, CentOS5, CentOS6): Can't locate object method "size" via package "Linux::Smaps" at ... Problem is that the new() call does not fail, but constructs an incomplete object which causes the strange "can't locate object method" errors afterwards. Digging further into it, an open(..., "/proc/smaps/$unprivileged_pid") does not fail on Linux, but a subsequent read fails. But the failing read is not detected in Linux::Smaps::update(). Regards, Slaven
Should be fixed in 0.10