From: Juergen Strobel Date: 2006-07-07T16:34:39+09:00 Subject: Re: [BUG] thread/sync.rb memory corruption --SkvwRMAIpAhPCcCJ Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 07, 2006 at 05:01:25AM +0900, Robert Klemme wrote: > 2006/7/6, Ara.T.Howard : > > > >agreed. this is actually the model i am using in the real code. note t= hat > >this code is simply a minimal example which triggers the bug. regardles= s=20 > >of > >whether it's a bad design or not (which it is) memory should not be=20 > >corrupted > >by a simply ruby script - if so i think it's a bug. >=20 > Hm, I'm not sure I agree. Try this one liner that will eventually > blow because too many threads are created that all wait for the mutex: >=20 > robert@fussel ~ > $ ruby -r thread -e 'm=3DMutex.new; m.synchronize { loop { Thread.new { > m.synchronize { } } } }' > [FATAL] failed to allocate memory This is an out of memory failure, with no unreleased GC'able memory in sight. Of course this fails, and there is no alternative to this. Memory corruption is a very different, and should not be produceable by ruby scripts. -J=FCrgen --=20 The box said it requires Windows 95 or better so I installed Linux --SkvwRMAIpAhPCcCJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iQEVAwUBRK4Oivy64gyiEfXtAQLfGAgAiV9kJ/oiJRWKoN34Kmri1z5Tc8VBUnkH nbiOHyw+tqwOq53aFhZh7Jnl2gmB+xXGSKo53DU1GJq4cEawnXwI2wdLznMsydp9 VQpoguvr5U09rxRlLbJUjt9nbwf/xv9NXCb+8783DWTiARufqd1JRPyJ9Ajglwp6 +S5rYm29pZUx4kO/VVGZ94dt9krZruDUHSNsOzm0pbmOGbAQ1AELapeMC2XtR24r I53z6DSHbHepvy2HFXp65W246Pqcb1Lt2q1xRT4NLg/p1n1OdUegVkqu0AL9VEsD 5fgGPGQEncEXZZwJS2T8Rr5DsEphpzg8xRAHZu+/4WNUtuEyPKO9cg== =apJT -----END PGP SIGNATURE----- --SkvwRMAIpAhPCcCJ--