Article View: netscape.public.mozilla.crypto
Article #2Re: Real world switch () with the MPS memory pool system!
From: Johann 'Myrkraverk' Oskarsson
Date: Fri, 09 Oct 2026 21:02
Date: Fri, 09 Oct 2026 21:02
73 lines
4469 bytes
4469 bytes
On 10/10/2026 4:45 AM, Kaz Kylheku wrote: > On 2026-10-09, Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote: >> On 10/8/2026 9:31 AM, Kaz Kylheku wrote: >> And don't forget that just recently, people found a security bug in >> OpenSSL [again] just because they neglected to include a garbage coll- >> ector in the system. Maybe they would have been better off, if they'd >> just used MPS from the start? > > Many programs that use OpenSSL nowadays are threaded. > > Threads + GC + stuff written in C => shit show > > You may fix some use-after-free bug, but you introduce 17 others, > the 16th and 17th of which won't be found until 2037 and 2050. > > I've pulled out my hair debugging GC problems in a single-threaded Lisp > implementation. > > You have to develop all the tooling and approaches for it because > none of the regular memory debugging tools understand your GC objects. > > I wanted Valgrind, so I had to integrate it, and it's not perfect. > > A newly created GC object is wrongly garbage collected, perhaps just > before it was properly made reachable. The object is reassigned to > a different purpose, but the original context uses it also. Happy > case: the object has a different type, incompatible with what the > original owner is doing, and so that blows up, and (happy again) > it happens close to where it was created. From there, there are > various shades of unhappy. > That's fair. And I deplore your lack of hair. Mine -- as seen on Blue- Sky -- is not from fighting garbage collectors. Though I suppose I could put more pictures of myself there. So I'll keep that in mind as something to do over the weekend. Now, on debugging garbage collectors, the MPS manual has this chapter on the subject, https://memory-pool-system.readthedocs.io/en/latest/guide/debug.html and I have to say that I have not had the displeasure of needing to use it -- yet. And on the subject of garbage collection and threads, the Memory Pool manual has this to say on the subject. The MPS is designed to work with multi-threaded programs. Functions in the C interface are thread safe, except in a few documented cases. See Threads. The allocation point protocol provides fast lock-free allocation on multiple threads simultaneously. See Allocation. So it would seem, at first glance, that the OpenSSL security issue -- I'll link it if anyone cares to ask, but it should be readily found -- would not have happened if they'd used the MPS from the start. And since they don't, and never did, there is no second glance to prove me wrong. I'll just note that I made the personal promise to myself, that I'd never contribute code to OpenSSL, so I will not undertake the effort of proving myself wrong in this case. Best wishes, and happy garbage collection! [1] I have not dug into the intern guts of it, and my memory of that part of the manual is vague. -- Johann | email: invalid -> com | http://www.myrkraverk.com/blog/ I'm not from the Internet, I just work there. | via Easynews.com https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:; Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
Technical Details
Message-ID:
<fDcyS.12429$wun8.10981@fx13.ams4>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!fx13.ams4.POSTED!not-for-mailReferences:
<EUBxS.8919$mPXe.2290@fx06.ams4> <20261007182218.446@kylheku.com> <N5cyS.10488$mPXe.6319@fx06.ams4> <20261009133919.155@kylheku.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!fx13.ams4.POSTED!not-for-mail MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Real world switch () with the MPS memory pool system! Newsgroups: comp.lang.c,comp.lang.misc,comp.lang.lisp,sci.crypt,netscape.public.mozilla.crypto References: <EUBxS.8919$mPXe.2290@fx06.ams4> <20261007182218.446@kylheku.com> <N5cyS.10488$mPXe.6319@fx06.ams4> <20261009133919.155@kylheku.com> Content-Language: en-US From: Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> Organization: Watcom Pro Ltd. In-Reply-To: <20261009133919.155@kylheku.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Lines: 73 Message-ID: <fDcyS.12429$wun8.10981@fx13.ams4> X-Complaints-To: abuse@easynews.com X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly. Date: Sat, 10 Oct 2026 05:02:01 +0800 X-Received-Bytes: 4325