--- Begin Message ---
I'm having problems understanding why the Integer>>#atRandom sometimes return a 
number greater than the receiver.
This problem only occurs when forking processes that generate random number 
using the above mentioned method.  Obviously, all processes share the same RNG 
from the Collection class.
Code below can reproduce (most of the time) the bug.
| n |
n := 3172918.
5 timesRepeat: [ [n timesRepeat: [ | alea |
                                    alea := n atRandom.
                                    (alea > n) ifTrue: [ self halt]]] forkAt: 
Processor userBackgroundPriority ]. 

I'm on Windows 10, Pharo4.0 Latest update: #40627.
Pertinent System Reporter info below:
Virtual Machine
---------------
F:\Pharo4\Pharo4.0\Pharo.exe
NBCoInterpreter NativeBoost-CogPlugin-HolgerHansPeterFreyther.21 uuid: 
e0df6e2d-5694-40e2-8035-dc217200b424 Sep 25 2014
NBCogit NativeBoost-CogPlugin-HolgerHansPeterFreyther.21 uuid: 
e0df6e2d-5694-40e2-8035-dc217200b424 Sep 25 2014
https://github.com/pharo-project/pharo-vm.git Commit: 
81b5d19917dcb78f22482a780deec48c53738396 Date: 2014-09-20 14:36:18 +0200 By: 
Esteban Lorenzano <[email protected]> Jenkins build #14858

Win32 built on Sep 25 2014 17:47:04 Compiler: 4.6.2
VMMaker versionString https://github.com/pharo-project/pharo-vm.git Commit: 
81b5d19917dcb78f22482a780deec48c53738396 Date: 2014-09-20 14:36:18 +0200 By: 
Esteban Lorenzano <[email protected]> Jenkins build #14858
NBCoInterpreter NativeBoost-CogPlugin-HolgerHansPeterFreyther.21 uuid: 
e0df6e2d-5694-40e2-8035-dc217200b424 Sep 25 2014
NBCogit NativeBoost-CogPlugin-HolgerHansPeterFreyther.21 uuid: 
e0df6e2d-5694-40e2-8035-dc217200b424 Sep 25 2014

Loaded VM Modules
-----------------
B2DPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
BitBltPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
FT2Plugin Freetype-Plugin-IgorStasenko.64 (e)
FilePlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
FloatArrayPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
JPEGReadWriter2Plugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
Kernel32
LargeIntegers v1.5 VMMaker.oscog-jeanbaptistearnaud.783 (i)
LocalePlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
Matrix2x3Plugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
MiscPrimitivePlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
NativeBoostPlugin NativeBoost-CogPlugin-HolgerHansPeterFreyther.21 (i)
SecurityPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
ZipPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)

VM Built-in Modules
-------------------
ADPCMCodecPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
AsynchFilePlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
B2DPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
B3DAcceleratorPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
BMPReadWriterPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
BitBltPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
CroquetPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
DSAPrims VMMaker.oscog-jeanbaptistearnaud.783 (i)
DropPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
FFTPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
FilePlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
FloatArrayPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
FloatMathPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
HostWindowPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
IA32ABI VMMaker.oscog-jeanbaptistearnaud.783 (i)
JPEGReadWriter2Plugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
JPEGReaderPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
JoystickTabletPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
Klatt VMMaker.oscog-jeanbaptistearnaud.783 (i)
LargeIntegers v1.5 VMMaker.oscog-jeanbaptistearnaud.783 (i)
LocalePlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
MIDIPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
Matrix2x3Plugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
MiscPrimitivePlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
Mpeg3Plugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
NativeBoostPlugin NativeBoost-CogPlugin-HolgerHansPeterFreyther.21 (i)
RePlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
SecurityPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
SerialPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
SocketPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
SoundCodecPrims VMMaker.oscog-jeanbaptistearnaud.783 (i)
SoundPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
StarSqueakPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
SurfacePlugin Sep 25 2014 (i)
UUIDPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)
Win32OSProcessPlugin 
VMConstruction-Plugins-OSProcessPlugin.oscog-EstebanLorenzano.43 (i)
ZipPlugin VMMaker.oscog-jeanbaptistearnaud.783 (i)

VM Configuration
----------------
F:\Pharo4\Pharo4.0\Pharo.ini
[Global]
DeferUpdate=1
ShowConsole=0
DynamicConsole=1
ReduceCPUUsage=0
ReduceCPUInBackground=0
3ButtonMouse=0
1ButtonMouse=0
UseDirectSound=1
PriorityBoost=0
B3DXUsesOpenGL=0
CaseSensitiveFileMode=0
Operating System/Hardware
-------------------------
Win32 6.2 IX86
Hardware Details
----------------
Hardware information: 
    Manufacturer: Unknown
    Model: Unknown
    Number of processors: 4
    Page size: 4096

Memory Information (upon launch):
    Physical Memory Size: 2097151 kbytes
    Physical Memory Free: 2097151 kbytes
    Page File Size: 4194303 kbytes
    Page File Free: 4194303 kbytes
    Virtual Memory Size: 2097024 kbytes
    Virtual Memory Free: 2015568 kbytes
    Memory Load: 45 percent

Processor 0: Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz
    Identifier: Intel64 Family 6 Model 94 Stepping 3
    ~MHZ: 2712

Processor 1: Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz
    Identifier: Intel64 Family 6 Model 94 Stepping 3
    ~MHZ: 2712

Processor 2: Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz
    Identifier: Intel64 Family 6 Model 94 Stepping 3
    ~MHZ: 2712

Processor 3: Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz
    Identifier: Intel64 Family 6 Model 94 Stepping 3
    ~MHZ: 2712

Graphics Hardware Details
-------------------------
Display Information: 
    Graphics adapter name: Intel(R) HD Graphics 530
    Primary monitor resolution: 1280 x 720

Device: ???
    Adapter String: Intel(R) HD Graphics 530
    Bios String: Intel Video BIOS
    Chip Type: Intel(R) HD Graphics Family
    DAC Type: Internal
    Memory Size: 0x40000000

Driver Versions:
    igdumdim64: 




 ----------------- 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

--- End Message ---

Reply via email to