develooper Front page | perl.perl5.porters | Postings from December 2013

[perl #118127] Perl crash when run under AppVerifier

Thread Previous
bulk88 via RT
December 23, 2013 03:40
[perl #118127] Perl crash when run under AppVerifier
Message ID:
On Sat Nov 23 14:16:48 2013, bulk88 wrote:
> Posting a patch to this problem for comments/review. The idea is to
> tag sockets handles with a special low 2 bits pattern. The kernel
> ignores the last 2 bits of all handles, so the only meaning the low 2
> bits have are on a user-mode (that includes kernel32.dll) level. 2
> closesocket calls are necessary to avoid a leak in ws2_32.dll's socket
> descriptor to winsock provider vtable hash table. I'm not 100% sure
> that this won't create another race like #118059 fixed. This patch
> breaks non-IFS/non-kernel handle socket provider protocols even harder
> than before. Before=Perl already calls dup/dup2 on socket handles,
> which calls DuplicateHandle in the CRT, if the socket handle isn't a
> kernel handle (but a user mode pointer), that causes breakage. Also I
> assume Perl's sysread/syswrite/buffered IO calls also won't work on
> non-kernel socket handles, I think I've seen a ticket about that
> somewhere on RT before. Perl may have had support for doing recv
> instead of read() on sockets in the past, but I might be imagining it,
> will need to research.


bulk88 ~ bulk88 at

via perlbug:  queue: perl5 status: open

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About