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

[ID 20001215.004] Sys::Syslog::xlate doesn't handle LOG_EMERG

Thread Next
From:
Mark J. Reed
Date:
December 15, 2000 18:22
Subject:
[ID 20001215.004] Sys::Syslog::xlate doesn't handle LOG_EMERG
Message ID:
200012160222.VAA13986@strange.turner.com
This is a bug report for perl from mreed@strange.turner.com,
generated with the help of perlbug 1.28 running under perl v5.6.0.


-----------------------------------------------------------------
The Sys::Syslog::xlate() function doesn't handle LOG_EMERG,
because of this line:

	eval { &$name } || -1;

LOG_EMERG has a value of 0, which causes xlate to return -1,
which causes syslog('emerg') to fail with an "invalid level/facility"
error.

That line should be replaced with something like these two lines:

	my $value = eval { &$name };
	defined($value) ? $value : -1;

While I discovered this bug in the 5.6.0 config described below,
I have verified that it is still present in the current
5.7.0 tree.
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=medium
---
Site configuration information for perl v5.6.0:

Configured by mreed at Thu Jun 29 15:49:13 EDT 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=solaris, osvers=2.7, archname=sun4-solaris
    uname='sunos strange 5.7 generic_106541-05 sun4u sparc sunw,ultra-5_10 '
    config_args='-ds -e -Dprefix=/opt/perl'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='cc', optimize='-O', gccversion=2.95.2 19991024 (release)
    cppflags='-fno-strict-aliasing -I/usr/local/include -I/opt/local/include'
    ccflags ='-fno-strict-aliasing -I/usr/local/include -I/opt/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib -L/opt/local/lib '
    libpth=/usr/local/lib /opt/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldb -ldl -lm -lc -lcrypt -lsec
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib -L/opt/local/lib'

Locally applied patches:
    

---
@INC for perl v5.6.0:
    /home/mreed/lib/perl
    /opt/perl/lib/5.6.0/sun4-solaris
    /opt/perl/lib/5.6.0
    /opt/perl/lib/site_perl/5.6.0/sun4-solaris
    /opt/perl/lib/site_perl/5.6.0
    /opt/perl/lib/site_perl/5.00554/sun4-solaris
    /opt/perl/lib/site_perl/5.00554
    /opt/perl/lib/site_perl/5.00553/sun4-solaris
    /opt/perl/lib/site_perl/5.00553
    /opt/perl/lib/site_perl/5.005/sun4-solaris
    /opt/perl/lib/site_perl/5.005
    /opt/perl/lib/site_perl
    .

---
Environment for perl v5.6.0:
    HOME=/home/mreed
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/dt/lib:/usr/openwin/lib:/usr/snadm/lib:/usr/ucblib:/opt/SUNWits/Graphics-sw/xgl/lib:/opt/hpnp/lib
    LOGDIR (unset)
    PATH=/home/mreed/bin/scripts:/home/mreed/bin/sun4:/opt/FSFcvs/bin:/opt/FSFgnu/bin:/opt/FSFgzip/bin:/opt/GVRpython/bin:/opt/JBxv/bin:/opt/JOtcl/bin:/opt/MITxpm/bin:/opt/MJRgsend/bin:/opt/NISTexpect/bin:/opt/NSBmetamail/bin:/opt/SUNWadm/bin:/opt/SUNWcorba/bin:/opt/SUNWdtpcv/bin:/opt/SUNWdxlib/bin:/opt/SUNWicg/bin:/opt/SUNWipx/bin:/opt/SUNWrtvc/bin:/opt/SUNWsmtv/bin:/opt/SUNWste/bin:/opt/SUNWsymon/bin:/opt/SUNWvts/bin:/opt/UCTelm/bin:/opt/USCrdist/bin:/opt/WUftpd/bin:/opt/apache/bin:/opt/cfengine/bin:/opt/gimp/bin:/opt/gtk/bin:/opt/hpnp/bin:/opt/local/bin:/opt/lsof/bin:/opt/misc/bin:/opt/ncftp/bin:/opt/perl/bin:/opt/pine/bin:/opt/pmsql/bin:/opt/python/bin:/opt/samba/bin:/opt/top/bin:/opt/vnc/bin:/opt/xxd/bin:/opt/zb/bin:/apps/bin:/usr/xpg4/bin:/usr/bin:/usr/ccs/bin:/usr/games:/usr/openwin/bin:/usr/dt/bin:/usr/ucb:/oracle/8.1.5/bin:/usr/sbin:/sbin:/etc:/usr/local/lib:/lib:/usr/java/bin:/usr/java1.1/bin:/usr/oasys/bin:/usr/proc/bin:/usr/sadm/bin:/usr/snadm/bin:/usr/vmsys/bin
    PERLLIB=/home/mreed/lib/perl
    PERL_BADLANG (unset)
    SHELL=/usr/bin/bash


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