From MAILER-DAEMON Thu Oct 12 16:32:05 2006
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1GY7Do-0006tx-QX
	for mharc-bug-ghostscript@gnu.org; Thu, 12 Oct 2006 16:32:04 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1GXewf-0002Lr-0f
	for bug-ghostscript@gnu.org; Wed, 11 Oct 2006 10:20:29 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1GXewd-0002L3-Ud
	for bug-ghostscript@gnu.org; Wed, 11 Oct 2006 10:20:28 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1GXewd-0002L0-RS
	for bug-ghostscript@gnu.org; Wed, 11 Oct 2006 10:20:27 -0400
Received: from [199.232.76.164] (helo=fencepost.gnu.org)
	by monty-python.gnu.org with esmtp (Exim 4.52) id 1GXf4e-0007eS-U0
	for bug-ghostscript@gnu.org; Wed, 11 Oct 2006 10:28:45 -0400
Received: from monty-python.gnu.org ([199.232.76.173])
	by fencepost.gnu.org with esmtp (Exim 4.34) id 1GXewd-0002p5-DO
	for gnu-ghostscript-bug@ftp.gnu.org; Wed, 11 Oct 2006 10:20:27 -0400
Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim
	4.52) id 1GXf4c-0007eH-VH
	for gnu-ghostscript-bug@ftp.gnu.org; Wed, 11 Oct 2006 10:28:44 -0400
Received: from [216.168.1.22] (helo=trinity.supernews.net)
	by monty-python.gnu.org with esmtps
	(TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GXf4c-0007dJ-Mr
	for gnu-ghostscript-bug@ftp.gnu.org; Wed, 11 Oct 2006 10:28:42 -0400
Received: from pa-sjc-01.sjc-v12.supernews.net ([10.20.222.34]:59210
	helo=pa-sjc-01.supernews.net)
	by trinity.supernews.net with esmtp (Exim 4.63 (FreeBSD))
	(envelope-from <nntp-bounce@supernews.net>) id 1GXewS-00048z-Le
	for gnu-ghostscript-bug@ftp.gnu.org; Wed, 11 Oct 2006 14:20:16 +0000
Received: (from news@localhost)
	by pa-sjc-01.supernews.net (8.13.6/8.13.6/Submit) id k9BEKG8H033391
	for gnu-ghostscript-bug@prep.ai.mit.edu; Wed, 11 Oct 2006 14:20:16 GMT
	(envelope-from nntp-bounce@supernews.net)
To: gnu-ghostscript-bug@ftp.gnu.org
Path: corp.supernews.com!not-for-mail
From: Michael Renda <michael.renda@makeready.com>
Newsgroups: gnu.ghostscript.bug
Date: Wed, 11 Oct 2006 10:20:14 -0400
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <C15275DE.488F%michael.renda@makeready.com>
User-Agent: Microsoft-Entourage/11.2.5.060620
Thread-Topic: Bug in 8.54 - 64-bit Windows
Thread-Index: AcbtQF4nnOzb4lkzEdu3zAAWy5VfYQ==
Mime-version: 1.0
Content-type: text/plain;
	charset="US-ASCII"
Content-transfer-encoding: 7bit
X-Complaints-To: abuse@supernews.com
Lines: 11
X-Mailman-Approved-At: Thu, 12 Oct 2006 16:32:03 -0400
Cc: 
Subject: Bug in 8.54 - 64-bit Windows
X-BeenThere: bug-ghostscript@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Bug reports and development for GNU GhostScript,
	the PostScript interpreter of the GNU project"
	<bug-ghostscript.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-ghostscript>,
	<mailto:bug-ghostscript-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/bug-ghostscript>
List-Post: <mailto:bug-ghostscript@gnu.org>
List-Help: <mailto:bug-ghostscript-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-ghostscript>,
	<mailto:bug-ghostscript-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Oct 2006 14:20:29 -0000

I have a PostScript file which I am attempting to convert to PDF from the
command line.

The conversion consistently fails using the 64-bit Windows version of
Ghostscript 8.54 (an application error and a corrupted output file).

The same command line consistently works using the 32-bit Windows version of
Ghostscript (even on a 64-bit OS).

Is this the proper place to report such issues?




From MAILER-DAEMON Sat Oct 21 18:56:28 2006
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1GbPlU-0007BK-75
	for mharc-bug-ghostscript@gnu.org; Sat, 21 Oct 2006 18:56:28 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1GbPlS-0007Ai-3D
	for bug-ghostscript@gnu.org; Sat, 21 Oct 2006 18:56:26 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1GbPlQ-00079o-VK
	for bug-ghostscript@gnu.org; Sat, 21 Oct 2006 18:56:25 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1GbPlQ-00079k-PM
	for bug-ghostscript@gnu.org; Sat, 21 Oct 2006 18:56:24 -0400
Received: from [208.210.124.79] (helo=rune.pobox.com)
	by monty-python.gnu.org with esmtp (Exim 4.52) id 1GbPlP-0003oF-OC
	for bug-ghostscript@gnu.org; Sat, 21 Oct 2006 18:56:24 -0400
Received: from rune (localhost [127.0.0.1])
	by rune.pobox.com (Postfix) with ESMTP id B3DEF8B325
	for <bug-ghostscript@gnu.org>; Sat, 21 Oct 2006 18:56:39 -0400 (EDT)
Received: from [192.168.1.102] (dsl-dhcp-211-239.kpunet.net [206.223.211.239])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by rune.sasl.smtp.pobox.com (Postfix) with ESMTP id D00D1897E2
	for <bug-ghostscript@gnu.org>; Sat, 21 Oct 2006 18:56:38 -0400 (EDT)
Message-ID: <453AA5A0.9090106@cpan.org>
Date: Sat, 21 Oct 2006 14:56:32 -0800
From: "Sean M. Burke" <sburke@cpan.org>
User-Agent: Thunderbird 1.5.0.7 (X11/20060922)
MIME-Version: 1.0
To: bug-ghostscript@gnu.org
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Subject: feature request: Pre-seeding the random number generator
X-BeenThere: bug-ghostscript@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Bug reports and development for GNU GhostScript,
	the PostScript interpreter of the GNU project"
	<bug-ghostscript.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-ghostscript>,
	<mailto:bug-ghostscript-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/bug-ghostscript>
List-Post: <mailto:bug-ghostscript@gnu.org>
List-Help: <mailto:bug-ghostscript-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-ghostscript>,
	<mailto:bug-ghostscript-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 21 Oct 2006 22:56:26 -0000

This is a feature request: I'd really really appreciate if you could
make the random number generator in ghostscript pre-seeded.

(Perl has been doing this for about ten years-- in the surprisingly
rare circumstances where programmers want /predictable/
pseudorandomness, they just need to explicitly feed srand an particular 
value.
If you want a bit of inspiration from Perl's pre-seeding, the code for
it is in here:
  http://www.devdaily.com/scw/c/perl-5.8.5/util.c.shtml
and look for the function "Perl_seed(pTHX)".)

I considered just replacing rand with something that reads from 
/dev/random, but besides portability problems, such file operations are 
apparently inaccessible in gs's (imminently default) SAFER mode.

I used to pre-seed by just doing "realtime srand", but now I see that
realtime has a very NONrandom value (see below).

I know that PostScript docs typically warn that rand's generator is 
typically pretty dumb, but that doesn't mean it /has/ to be dumb in 
GhostScript.


% perl -e 'system q[echo realtime dup srand rand exch stack |gs -q -]
for(1..20)'
81
1361367
81
1361367
82
1378174
85
1428595
82
1378174
81
1361367
84
1411788
83
1394981
83
1394981
81
1361367
81
1361367
81
1361367
80
1344560
83
1394981
81
1361367
83
1394981
80
1344560
81
1361367
83
1394981
87
1462209






From MAILER-DAEMON Sun Oct 22 14:12:19 2006
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Gbho2-0006zl-R4
	for mharc-bug-ghostscript@gnu.org; Sun, 22 Oct 2006 14:12:18 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1GbLYg-0007bS-DT
	for bug-ghostscript@gnu.org; Sat, 21 Oct 2006 14:26:58 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1GbLYf-0007aq-C9
	for bug-ghostscript@gnu.org; Sat, 21 Oct 2006 14:26:57 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1GbLYf-0007ag-35
	for bug-ghostscript@gnu.org; Sat, 21 Oct 2006 14:26:57 -0400
Received: from [155.101.98.135] (helo=mail.math.utah.edu)
	by monty-python.gnu.org with esmtps
	(TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GbLYe-0001qv-K2
	for bug-ghostscript@gnu.org; Sat, 21 Oct 2006 14:26:57 -0400
Received: from psi.math.utah.edu (psi.math.utah.edu [155.101.96.19])
	by mail.math.utah.edu (8.13.6/8.13.6) with ESMTP id k9LHPekl009995;
	Sat, 21 Oct 2006 11:25:40 -0600 (MDT)
Received: from psi.math.utah.edu (localhost [127.0.0.1])
	by psi.math.utah.edu (8.13.6/8.13.6) with ESMTP id k9LHPewW029426;
	Sat, 21 Oct 2006 11:25:40 -0600 (MDT)
Received: (from beebe@localhost)
	by psi.math.utah.edu (8.13.6/8.13.6/Submit) id k9LHPedq029424;
	Sat, 21 Oct 2006 11:25:40 -0600 (MDT)
Date: Sat, 21 Oct 2006 11:25:40 -0600 (MDT)
From: "Nelson H. F. Beebe" <beebe@math.utah.edu>
To: bug-ghostscript@gnu.org
X-US-Mail: "Department of Mathematics, 110 LCB, University of Utah, 155 S
	1400 E RM 233, Salt Lake City, UT 84112-0090, USA"
X-Telephone: +1 801 581 5254
X-FAX: +1 801 585 1640, +1 801 581 4148
X-URL: http://www.math.utah.edu/~beebe
Message-ID: <CMM.0.95.0.1161451540.beebe@psi.math.utah.edu>
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0
	(mail.math.utah.edu [155.101.98.135]);
	Sat, 21 Oct 2006 11:25:40 -0600 (MDT)
X-Mailman-Approved-At: Sun, 22 Oct 2006 14:12:15 -0400
Cc: beebe@math.utah.edu
Subject: gnu-ghostscript-8.55: segment faults in 64-bit worlds
X-BeenThere: bug-ghostscript@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Bug reports and development for GNU GhostScript,
	the PostScript interpreter of the GNU project"
	<bug-ghostscript.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-ghostscript>,
	<mailto:bug-ghostscript-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/bug-ghostscript>
List-Post: <mailto:bug-ghostscript@gnu.org>
List-Help: <mailto:bug-ghostscript-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-ghostscript>,
	<mailto:bug-ghostscript-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 21 Oct 2006 18:26:59 -0000

I've completed build attempts of gnu-ghostscript-8.55 on about 25
flavors of Unix.  Only builds on GNU/Linux systems succeeded; problem
reports about other platforms will follow over the next few days.

On two quite-different 64-bit systems, GNU/Linux on Alpha and on
IA-64, I get identical failures at run time when gs is built with gcc:

	% cd lib
	% gdb ../bin/gs
	GNU gdb 6.3
	...
	(gdb) run ../examples/tiger.eps
	Starting program: /local/build/gcc4/gnu-ghostscript-8.55/bin/gs ../examples/tiger.eps
	(no debugging symbols found)
	(no debugging symbols found)
	(no debugging symbols found)
	(no debugging symbols found)
	(no debugging symbols found)
	GNU Ghostscript 8.55 (2006-10-17)
	Copyright (C) 2006 artofcode LLC, Benicia, CA.  All rights reserved.
	This software comes with NO WARRANTY: see the file PUBLIC for details.

	Program received signal SIGSEGV, Segmentation fault.
	0x4000000000143d61 in refs_compact ()
	(gdb) where
	#0  0x4000000000143d61 in refs_compact ()
	#1  0x40000000001428a0 in gs_gc_reclaim ()
	#2  0x40000000002377a0 in context_reclaim ()
	#3  0x40000000000edef0 in ireclaim ()
	#4  0x40000000000e50c0 in interp_reclaim ()
	#5  0x40000000000e71d0 in gs_interpret ()
	#6  0x40000000000d0830 in gs_main_interpret ()
	#7  0x40000000000d2be0 in gs_main_init2 ()
	#8  0x40000000000d4060 in runarg ()
	#9  0x40000000000d4670 in argproc ()
	#10 0x40000000000d7fe0 in gs_main_init_with_args ()
	#11 0x4000000000006f20 in main ()

This also occurs on IA-64 when I change the compiler from gcc 3.4.6 to
4.1.0, and when I build with opencc (PathScale EKOPath(TM) Compiler
Suite: Version 1.0).

For the record, I did the first IA-64 build with this environment:

Machinetype:            Dell PowerEdge 3250: Intel Itanium-2 (1400 MHz) (2 CPUs, 4GB RAM);
                        GNU/Linux 2.6.9-22.0.2.EL (Red Hat Enterprise Linux AS release 4 (Nahant Update 3))
Remote cc version:      cc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-3)
Configure environment:  CC=/usr/bin/cc CXX=/usr/bin/c++ LDFLAGS="-Wl,-rpath,/usr/local/lib" FC=g77 F77=g77

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: beebe@math.utah.edu  -
- 155 S 1400 E RM 233                       beebe@acm.org  beebe@computer.org -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------



From MAILER-DAEMON Fri Oct 27 04:30:31 2006
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1GdN6l-0001dB-Kb
	for mharc-bug-ghostscript@gnu.org; Fri, 27 Oct 2006 04:30:31 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1GdN6k-0001cX-5N
	for bug-ghostscript@gnu.org; Fri, 27 Oct 2006 04:30:30 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1GdN6j-0001cK-6O
	for bug-ghostscript@gnu.org; Fri, 27 Oct 2006 04:30:29 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1GdN6j-0001cG-0B
	for bug-ghostscript@gnu.org; Fri, 27 Oct 2006 04:30:29 -0400
Received: from [208.210.124.79] (helo=rune.pobox.com)
	by monty-python.gnu.org with esmtp (Exim 4.52) id 1GdN6j-00032f-08
	for bug-ghostscript@gnu.org; Fri, 27 Oct 2006 04:30:29 -0400
Received: from rune (localhost [127.0.0.1])
	by rune.pobox.com (Postfix) with ESMTP id D66A68926D;
	Fri, 27 Oct 2006 04:30:09 -0400 (EDT)
Received: from [192.168.1.102] (dsl-dhcp-211-239.kpunet.net [206.223.211.239])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by rune.sasl.smtp.pobox.com (Postfix) with ESMTP id 4135C8AD38;
	Fri, 27 Oct 2006 04:30:05 -0400 (EDT)
Message-ID: <4541C3AA.5070400@cpan.org>
Date: Fri, 27 Oct 2006 00:30:34 -0800
From: "Sean M. Burke" <sburke@cpan.org>
User-Agent: Thunderbird 1.5.0.7 (X11/20060922)
MIME-Version: 1.0
To: Didier LINK <didier.link@wanadoo.fr>
References: <453AA5A0.9090106@cpan.org>
	<1161515699.26241.12.camel@neutrino.cosmos.net>
In-Reply-To: <1161515699.26241.12.camel@neutrino.cosmos.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Cc: bug-ghostscript@gnu.org
Subject: Re: feature request: Pre-seeding the random number generator
X-BeenThere: bug-ghostscript@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Bug reports and development for GNU GhostScript,
	the PostScript interpreter of the GNU project"
	<bug-ghostscript.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-ghostscript>,
	<mailto:bug-ghostscript-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/bug-ghostscript>
List-Post: <mailto:bug-ghostscript@gnu.org>
List-Help: <mailto:bug-ghostscript-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-ghostscript>,
	<mailto:bug-ghostscript-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 27 Oct 2006 08:30:30 -0000

On 10/22/2006 03:14 AM, Didier LINK wrote:
> Le samedi 21 octobre 2006 =E0 14:56 -0800, Sean M. Burke a =E9crit :
>> This is a feature request: I'd really really appreciate if you could
>> make the random number generator in ghostscript pre-seeded.
>=20
> Why do you need this enhancement exactly ?

I like to generate documents that contain, well, some degree of=20
randomness, without having to duck out of PostScript to fetch a new=20
srand seed.  For example, I like to reload this:
http://interglacial.com/~sburke/pub/PostScript/dynamically_generated_maze=
_simpler.ps.txt
but I very often get the same two or three mazes over and over and over.

This problem recurs with many other documents of mine that attempt=20
randomness.

If that sounds dull, tell me, and I can make up something totally=20
compelling about how I'm actually the person generating the entire=20
Albanian Lottery's cards using /just/ sh and GhostScript and a can of=20
gold paint, and how the ghost of Hoxha is angry that I keep generating=20
the same four or five cards over and over.
How's that for a use-case and/or a rich comedic premise?

>> (Perl has been doing this for about ten years-- in the surprisingly
>> rare circumstances where programmers want /predictable/
>> pseudorandomness, they just need to explicitly feed srand an particula=
r=20
>> value.
>> If you want a bit of inspiration from Perl's pre-seeding, the code for
>> it is in here:
>>   http://www.devdaily.com/scw/c/perl-5.8.5/util.c.shtml
>> and look for the function "Perl_seed(pTHX)".)
>>
>> I considered just replacing rand with something that reads from=20
>> /dev/random, but besides portability problems, such file operations ar=
e=20
>> apparently inaccessible in gs's (imminently default) SAFER mode.
>=20
> I think it's possible to introduce a better initial value in the code
> with a read from /dev/random but it's not portable on all architectures
> that's are supported by ghostscript. I need to investigate in this way.

Excellent!  At this point, anything would be better than the current=20
behavior.

(In the old days of my programming in other languages with poor=20
pre-seeding: I used to do pretty well with taking the current process ID=20
number (or, if under Windows, instead using GetTickCount, since Windows=20
often reuses process IDs almost immediately), shift it four bits left,=20
and xor that against the lower twelve bits of time or utime or something=20
of the sort.)

>> I used to pre-seed by just doing "realtime srand", but now I see that
>> realtime has a very NONrandom value (see below).
>=20
> Yes I see, and it's plateform dependent, on my amd64 the random numbers
> generated by your perl script are a little bit better. But why do a
> srand at each iteration of the loop ? It's certainly better to
> initialize one time and use rrand function to iterate new random number=
s
> inside gs. I'm wrong ?

It was just minimal example code to illustrate the problem of realtime's=20
value not being useful as an initial value for srand.

>> I know that PostScript docs typically warn that rand's generator is=20
>> typically pretty dumb, but that doesn't mean it /has/ to be dumb in=20
>> GhostScript.
> Yes but they need to be compliant with the Adobe's specifications and
> reference implementation of postscript interpreter.

I appreciate you noting that One Must Be Very Careful-- but I swear, if=20
Adobe actually does mandate that the random number generator /not/ be=20
pre-seeded, I will SHOWER you with gifts.



From MAILER-DAEMON Tue Oct 31 20:29:20 2006
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Gf4ut-0001Zi-LG
	for mharc-bug-ghostscript@gnu.org; Tue, 31 Oct 2006 20:29:19 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Gf4us-0001Yc-7c
	for bug-ghostscript@gnu.org; Tue, 31 Oct 2006 20:29:18 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Gf4un-0001VU-4x
	for bug-ghostscript@gnu.org; Tue, 31 Oct 2006 20:29:17 -0500
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Gf4un-0001VQ-0G
	for bug-ghostscript@gnu.org; Tue, 31 Oct 2006 20:29:13 -0500
Received: from [64.34.169.74] (helo=f7.net)
	by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gf4um-0004or-UY
	for bug-ghostscript@gnu.org; Tue, 31 Oct 2006 20:29:13 -0500
X-Envelope-From: karl@freefriends.org
X-Envelope-To: bug-ghostscript@gnu.org
Received: (from karl@localhost)
	by f7.net (8.11.7-20030920/8.11.7) id kA11SU313208;
	Tue, 31 Oct 2006 19:28:30 -0600
Date: Tue, 31 Oct 2006 19:28:30 -0600
Message-Id: <200611010128.kA11SU313208@f7.net>
From: karl@freefriends.org (Karl Berry)
To: sburke@cpan.org
In-Reply-To: <4541C3AA.5070400@cpan.org>
Cc: bug-ghostscript@gnu.org
Subject: Re: feature request: Pre-seeding the random number generator
X-BeenThere: bug-ghostscript@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Bug reports and development for GNU GhostScript,
	the PostScript interpreter of the GNU project"
	<bug-ghostscript.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-ghostscript>,
	<mailto:bug-ghostscript-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/bug-ghostscript>
List-Post: <mailto:bug-ghostscript@gnu.org>
List-Help: <mailto:bug-ghostscript-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-ghostscript>,
	<mailto:bug-ghostscript-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Nov 2006 01:29:18 -0000

    > with a read from /dev/random but it's not portable on all architectures

I believe reading from /dev/random can block.  (As mentioned in
Perl_seed(pTHX) you kindly pointed us to :).  There's a non-blocking
/dev/urandom, even less portable, but useful where it exists.

There has been tons of research on this, and plenty of implementations
too.  But just using that Perl code, suitably munged, seems like the
simplest thing to do :).

I wonder whether GPL Ghostscript has already done something along these
lines, or intentionally not implemented it for some good reason, or
something.  Isn't there a public bug database or something?

Best,
Karl



