develooper Front page | perl.perl5.porters | Postings from June 2008

Linux::Smaps kernel/perlio dependencies

Thread Next
From:
Torsten Foertsch
Date:
June 3, 2008 02:03
Subject:
Linux::Smaps kernel/perlio dependencies
Message ID:
200806031104.01044.torsten.foertsch@gmx.net
Hi,

I have recently got a bug report about Linux::Smaps. The poster said it'd
report 2 [vdso] areas and that it can be cured if /proc/self/smaps is opened
with '<:stdio'. Later on he also found the behavior depends on the kernel
version, 2.6.25.3 shows 2 vdsos 2.6.23.1-21 only one.

Since I don't have any of these kernels I am asking for help. To all of my
knowledge multiple vdsos is nonsense. But is it a kernel bug or a bug in the
perlio layer?

Could you please run the following command on various combinations of linux
kernel and perlio?

PERLIO="stdio" perl -pe 'BEGIN {my $smaps="/proc/$$/smaps";
  open STDIN, "<", $smaps or die "$!\n"; system "cat -n $smaps"}
  $_="$.\t$_"' | grep vdso

It should print 2 almost identical lines. If there are more please report.

Here an example:

$ PERLIO="stdio" perl -pe 'BEGIN {my $smaps="/proc/$$/smaps"; open STDIN, "<", $smaps or die "$!\n"; system "cat -n $smaps"} $_="$.\t$_"'|grep vdso
   321  ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
321     ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]

Keep in mind that /proc/$$/smaps exists only for kernels >=2.6.14.

Thanks,
Torsten

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About