strace perl -e 'msgget( 0xdeadbeef, 0 );' ... msgget(0x80000000, 0) = 655361 #### # A testcase exhibiting the issue use IPC::SysV qw( IPC_CREAT IPC_RMID ); use Test::More tests => 1; use strict; use warnings; my $last_key = 0x80000000; my $i32b_key = 0xdeadbeef; # Anything > $last_key cleanup(); test(); cleanup(); sub cleanup { my $queue_id = msgget $last_key, 0; msgctl $queue_id, IPC_RMID, 0 if defined $queue_id; $queue_id = msgget $i32b_key, 0; msgctl $queue_id, IPC_RMID, 0 if defined $queue_id; return; } sub test { my $queue1_id = msgget $i32b_key, IPC_CREAT; my $queue2_id = msgget $last_key, IPC_CREAT; my $msg = sprintf "Queues 0x%x and 0x%x have the same ID 0x%x", $last_key, $i32b_key, $queue1_id; isnt( $queue1_id, $queue2_id, $msg ); return; } 1;