New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File descriptors leakage in PerlIO leads to program crash #9053
Comments
From root@s10.ucoz.ruThis is a bug report for perl from yuriy@uch.net, Change 30946, patch 30633 "PerlIO_exportFILE() and GD-2.35 module contains functions like Following code produces "Too many open files" error, which does not appear on 5.8.8-stable use GD; "close" does not close the file. Some experiments were held. newFromJpeg is realized as follows: #define GDIMAGECREATEFROMJPEG(x) gdImageCreateFromJpeg(PerlIO_findFILE(x)) GD::Image According to documentation (perlapio) PerlIO_findFILE does not require to call PerlIO_releaseFILE. But FILE* tmp; and another try was made with: FILE* tmp; Both variants solved the problem of descriptor leakage but introduced a new one - unknown errors void trying to call jpegfile after newFromJpeg, such code open(F,">image1.jpg"); produces just empty file 'image2.jpg'. If PerlIO_releaseFILE is absent, file descriptor is not closed. It seems In general, I found two ways for solving this problem without changing GD module: Flags: Site configuration information for perl v5.8.8: Configured by root at Tue Oct 2 16:39:17 MSD 2007. Summary of my perl5 (revision 5 version 8 subversion 8 patch 31996) configuration: Locally applied patches: @INC for perl v5.8.8: Environment for perl v5.8.8: |
From @eserte"root@s10.ucoz.ru (via RT)" <perlbug-followup@perl.org> writes:
[...] Confirmed also for perl5.10.0@32039 on amd64-freebsd. This seems to $ limits -n 100 perl5.10.0 -Mblib -MTerm::Size=chars -e 'for (1..100) { open(TTY, "/dev/tty") or die "$! ($i)"; $i++; chars(\*TTY); close TTY }' Regards, -- |
The RT System itself - Status changed from 'new' to 'open' |
Migrated from rt.perl.org#46207 (status was 'open')
Searchable as RT46207$
The text was updated successfully, but these errors were encountered: