[Bug 171111] (libperl) could not run system-config-printer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug report.

Summary: (libperl) could not run system-config-printer


https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=171111


jlieskov@xxxxxxxxxx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jlieskov@xxxxxxxxxx




------- Additional Comments From jlieskov@xxxxxxxxxx  2006-03-13 07:48 EST -------
Have run the test script from
https://rt.perl.org/rt3/Ticket/Display.html?id=38223 (will attach this file)
on 3 systems with 3 format of the "perl.h" file:

1, perl 5.8.8

./test.perl
(row,col) = (54,155)     => PASS

Form of the patch: 

#ifndef IOCPARM_LEN
#   ifdef IOCPARM_MASK
        /* on BSDish systems we're safe */
#       define IOCPARM_LEN(x)  (((x) >> 16) & IOCPARM_MASK)
#   else
#       if defined(_IOC_SIZE) && defined(__GLIBC__)
        /* on Linux systems we're safe; except when we're not [perl #38223] */
#           define IOCPARM_LEN(x) (_IOC_SIZE(x) < 256 ? 256 : _IOC_SIZE(x))
#       else
        /* otherwise guess at what's safe */
#           define IOCPARM_LEN(x)       256
#       endif
#   endif
#endif

2, perl 5.8.6

./test.perl
(row,col) = (54,155)  => PASS

Form of the patch: 

#ifndef IOCPARM_LEN
#   ifdef IOCPARM_MASK
        /* on BSDish systes we're safe */
#       define IOCPARM_LEN(x)  (((x) >> 16) & IOCPARM_MASK)
#   else
        /* otherwise guess at what's safe */
#       define IOCPARM_LEN(x)   256
#   endif
#endif

=> seems it's enough to hardly set the value of IOCPARM_LEN(x) to 256
and don't take into account the Linux system's branch, because:

3, perl 5.8.6

./test.perl
Possible memory corruption: ioctl overflowed 3rd argument at ./test.perl line 5.

=> FAIL 

Form of the patch: 

#ifndef IOCPARM_LEN
#   ifdef IOCPARM_MASK
        /* on BSDish systems we're safe */
#       define IOCPARM_LEN(x)  (((x) >> 16) & IOCPARM_MASK)
#   else
#       ifdef _IOC_SIZE
                /* on Linux systems we're safe */
#               define IOCPARM_LEN(x) _IOC_SIZE(x)
#       else
                /* otherwise guess at what's safe (we're UNSAFE!) */
#               warning "unsafe assumption of IOCPARM_LEN=256"
#               define IOCPARM_LEN(x)   256
#       endif
#   endif
#endif

This patch doesn't work. 

So the solution is either to use patch without the linux branch, and hardly
set value of IOCPARM_LEN(x) to 256 (patch 2,), or take into account  
_IOC_SIZE and use the newest patch ( patch 1,).

-- 
Configure bugmail: https://bugzilla.redhat.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux