# New Ticket Created by  [EMAIL PROTECTED] 
# Please include the string:  [perl #36588]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=36588 >


This is a bug report for perl from [EMAIL PROTECTED], generated with
the help of perlbug 1.35 running under perl v5.8.6.


-----------------------------------------------------------------
[Please enter your report here]

Hi,

I ran into a problem with semctl() on our Perl 5.8.6. SETVAL does
not seem to do the right thing. The call suceeds, but subsequent
calls to GETVAL and GETALL return 0, and an attempt to lock waits
forever. The code snippet below prints correct "1" on 32-bit build
of Perl 5.6.1, but prints incorrect "0" on 64-bit build of Perl
5.8.6.

use strict;
use IPC::SysV qw(IPC_NOWAIT SEM_UNDO S_IRWXU IPC_CREAT IPC_EXCL
SETVAL GETALL); my $InstanceLock = semget( 123456, 1,
S_IRWXU|IPC_CREAT|IPC_EXCL ); unless ($InstanceLock) { die "Failed
to create new semaphore: $!\n"; } print "Created new semaphore\n";
unless (semctl($InstanceLock,0,SETVAL,1)) { die "Failed to setval:
$!\n"; } my $data = ""; unless
(semctl($InstanceLock,0,GETALL,$data)) { die "Failed to getval:
$!\n"; } my @getall = unpack("s!*",$data); print @getall,"\n";

Output from 5.6.1 (32-bit):
Created new semaphore
1

Output from 5.8.6 (64-bit):
Created new semaphore
0

(Of course, I called ipcrm between the two tests to delete the
semaphore. I'm saying this just in case :-))


Thanks,

   Petr Novotny
   [EMAIL PROTECTED]

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=high
---
Site configuration information for perl v5.8.6:

Configured by urbang at Tue May 31 11:37:17 METDST 2005.

Summary of my perl5 (revision 5 version 8 subversion 6)
configuration:   Platform:
    osname=hpux, osvers=11.11, archname=PA-RISC2.0-LP64
    uname='hp-ux hpl2pdc b.11.11 u 9000800 179404641 unlimited-user
license '     config_args='-A prepend:libswanted=cl pthread 
-Duse64bitall'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef     useperlio=define d_sfio=undef
uselargefiles=define usesocks=undef     use64bitint=define
use64bitall=define uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags =' -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings
+DD64 -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 ',     optimize='+O2 +Onolimit',
    cppflags='-Aa -D__STDC_EXT__ -D_HPUX_SOURCE -Ae -D_HPUX_SOURCE
-Wl,+vnocompatwarnings +DD64 -I/usr/local/include'    
ccversion='B.11.11.08', gccversion='', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8,
byteorder=87654321     d_longlong=define, longlongsize=8,
d_longdbl=define, longdblsize=16     ivtype='long', ivsize=8,
nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8    
alignbytes=8, prototype=define
  Linker and Libraries:
    ld='/usr/bin/ld', ldflags =' +DD64 -L/usr/local/lib
-L/lib/pa20_64'     libpth=/usr/local/lib /lib/pa20_64 /lib
/usr/lib /usr/ccs/lib
    libs=-lcl -lpthread -lnsl -lnm -ldl -ldld -lm -lsec -lc
    perllibs=-lcl -lpthread -lnsl -lnm -ldl -ldld -lm -lsec -lc
    libc=/lib/pa20_64/libc.sl, so=sl, useshrplib=true,
libperl=libperl.sl     gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-B,deferred '     cccdlflags='+Z', lddlflags='-b
+vnocompatwarnings -L/usr/local/lib -L/lib/pa20_64'

Locally applied patches:
    

---
@INC for perl v5.8.6:
    /usr/local/perl586/lib/5.8.6/PA-RISC2.0-LP64
    /usr/local/perl586/lib/5.8.6
    /usr/local/perl586/lib/site_perl/5.8.6/PA-RISC2.0-LP64
    /usr/local/perl586/lib/site_perl/5.8.6
    /usr/local/perl586/lib/site_perl
    .

---
Environment for perl v5.8.6:
    HOME=/pneusr.l2pdc/pne/dev/petrne
    LANG (unset)
    LANGUAGE (unset)
   
LD_LIBRARY_PATH=/pneusr.l2pdc/pne/dev/petrne/proj/cmf550V64/lib:/pnechome/pne/ccpne/ccpne/proj/cmf550V64/lib:/usr/local64/gmp-4.1.2/lib::/oravl01/oracle/9.2.0.6/lib:/opt/cobol/cobdir/coblib:/opt/syncsort64.3.4/lib:/usr/lib/pa20_64:/usr/lib:/opt/TimesTen/tt5034_64/lib
    LOGDIR (unset)
   
PATH=/usr/local/ccmngr_p/ccgnrl/v10/bin:/opt/imake/bin:/opt/java1.4/bin:/pnechome/pne/ccpne/ccpne/proj/gatl550V64/bin:/pnechome/pne/ccpne/ccpne/proj/ginftl550V64/bin:/oravl01/oracle/9.2.0.6:/oravl01/oracle/9.2.0.6/bin:/pneusr.l2pdc/pne/dev/petrne/proj/cmf550V64/bin:/pnechome/pne/ccpne/ccpne/proj/cmf550V64/bin:/pneusr.l2pdc/pne/dev/petrne/proj/gmf550V64/bin:/pnechome/pne/ccpne/ccpne/proj/gmf550V64/bin:/pnechome/pne/ccpne/ccpne/proj/ggen550V64/bin:/pneusr.l2pdc/pne/dev/petrne/proj/mfgdd550V64/bin:/pnechome/pne/ccpne/ccpne/proj/mfgdd550V64/bin:/usr/local/ccmngr_p/ccgnrl/v10/bin:/oravl01/oracle/9.2.0.6:/oravl01/oracle/9.2.0.6/bin:/pnechome/pne/ccpne/ccpne/proj/gatl550/bin:/pnechome/pne/ccpne/ccpne/proj/ginftl550/bin:/usr/local/bin:/opt/ansic/bin:/usr/bin:/usr/contrib/bin:/usr/contrib/bin/X11:/usr/vue/bin:/usr/bin/X11:/bin:/opt/langtools/bin:/usr/ccs/bin:/opt/perf/bin:/etc:/usr/local/ccmngr_p/bin:/pneusr.l2pdc/pne/dev/petrne/bin:/opt/softbench/bin:/usr/sbin:.:/opt/syncsort64.3.4/b
 in:/usr/local/xerces-c2_1_0_32b:/opt/syncsort64.3.4/bin
    PERL_BADLANG (unset)
    SHELL=/bin/tcsh


-----

Reply via email to