🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: netscape.public.mozilla.crypto
10 messages
10 total messages Started by Johann 'Myrkraverk' Oskarsson Fri, 09 Oct 2026 20:26
Re: Real world switch () with the MPS memory pool system!
#1
Author: Johann 'Myrkraverk' Oskarsson
Date: Fri, 09 Oct 2026 20:26
49 lines
3236 bytes
On 10/8/2026 9:31 AM, Kaz Kylheku wrote:

On your previous points, /point taken/, and I have not much to say about
any of it.

 >> Another question is, would you consider using the MPS memory pool system
 >> if you were to implement something garbage collected, like Common Lisp
 >> or ML [1]?
 > The intersection of "people who still write in C" and "people who want
 > to use someone else's C memory pool thing" is slowly converging to null.


I see.  Well, I'm /still alive/, so while it's converging, it's not
/null/ yet.  I have to say I'm getting some enjoyment out of using the
MPS, and learning new things is always fun.

I have seen previous posters in comp.lang.c get almost if not literally
frothing at the mouth at the mere mention of garbage collectors [1].  I
do not know if any of them will deign to comment on this thread, so we
can just wait and see.

I forgot for which programming language MPS was originally designed for,
though I suspect it was ML, and the Ravenbrook website was gone last
time I checked.  The /readme/ on GitHub merely states it's been used in
successful commercial projects since 1997, so I believe it's of some
code quality.

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?

I have included sci.crypt, and netscap.public.mozilla.crypto in this
discussion, in case any of the posters there want to comment on garbage
collection in SSL libraries.


Best wishes, and happy garbage collection!


[1] Since we rarely get to see pictures of people as they post on Use-
net it's hard to say if they are /literally/ frothing at the mouth from
anger.

-- 
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
Re: Real world switch () with the MPS memory pool system!
#3
Author: Kaz Kylheku
Date: Fri, 09 Oct 2026 20:45
34 lines
2708 bytes
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.

-- 
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
Re: Real world switch () with the MPS memory pool system!
#2
Author: Johann 'Myrkraverk' Oskarsson
Date: Fri, 09 Oct 2026 21:02
73 lines
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
Re: Real world switch () with the MPS memory pool system!
#5
Author: tfb
Date: Sat, 10 Oct 2026 09:45
10 lines
1639 bytes
Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote:

> I forgot for which programming language MPS was originally designed for,
> though I suspect it was ML, and the Ravenbrook website was gone last
> time I checked. 

Dylan, I am almost certain.

-- 
tfeb.org/computer/
Re: Real world switch () with the MPS memory pool system!
#6
Author: Johann 'Myrkraverk' Oskarsson
Date: Sun, 11 Oct 2026 01:28
124 lines
7004 bytes
On 10/10/2026 5:02 AM, Johann 'Myrkraverk' Oskarsson wrote:
> 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.

The OpenSSL vulnerability I was thinking of is HollowByte, and from July
2026 should be fresh in everyone's memory.  For the few lurkers of comp.
lang.c who don't keep updated with OpenSSL and named vulnerabilities, I
link you the following article,

   https://my-ssl.com/learn/openssl-hollowbyte-vulnerability-2026

and quote the TL;DR.

     HollowByte is the latest OpenSSL vulnerability, disclosed 17 July
     2026. An unauthenticated attacker sends an 11-byte malformed TLS
     ClientHello, and a handshake worker on your server hangs onto the
     socket and its buffer instead of releasing them. Repeat the request
     a few thousand times a second and the server stops accepting new
     HTTPS connections. It affects supported OpenSSL 3.x branches shipped
     before the July 2026 fix. Upgrade the openssl package from your
     distro and restart every daemon that links it — a package update
     alone won't help until you restart the processes. No memory
     disclosure, no key leak, so you do not need to reissue your
     certificate. Behind Cloudflare, an AWS ALB, or an already-patched
     reverse proxy? You're shielded at the edge, but patch the origin
     anyway before the next audit.

     We've walked through this response cycle on production fleets for
     every OpenSSL CVE since Heartbleed. What follows is the checklist we
     actually run — versions, commands, mitigations, and the reissue
     question we get asked every single time.

And while I can't be sure, I'm fairly certain some sort of garbage coll-
ector in the new connection parser [1] would have prevented this.  But
keep in mind OpenSSL has been plagued with memory leaks since its incep-
tion, so it's not like memory usage was high on anyone's priority list.

I mean, didn't Heartbleed happen because people were lazy about memory
boundaries?  Why bother free() with any of the memory, right?  It can
be read later on with the right payload incantation anyway.

So yeah; anyone making a new S.S.L. library from scratch is going to
have to deal with this attack too; and hopefully they'll use some sort
of garbage collection in the new connection parser.



Best wishes, and happy bugs in OpenSSL!


[1] Surely, with a brand new connection, you can reuse the previous att-
emtp when you get more data, right?
-- 
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
Re: Real world switch () with the MPS memory pool system!
#7
Author: George Neuner
Date: Sun, 11 Oct 2026 05:13
15 lines
1894 bytes
On Sat, 10 Oct 2026 09:45:19 -0000 (UTC), tfb <tfb@work.it.out> wrote:

>Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote:
>
>> I forgot for which programming language MPS was originally designed for,
>> though I suspect it was ML, and the Ravenbrook website was gone last
>> time I checked. 
>
>Dylan, I am almost certain.

I /don't/ know for certain, but according to its own history MPS was
developed by Harlequin - which made a Lisp.  Dylan came from Apple.


https://memory-pool-system.readthedocs.io/en/latest/bib.html#brooksby02
Re: Real world switch () with the MPS memory pool system!
#4
Author: Johann 'Myrkraverk' Oskarsson
Date: Sun, 11 Oct 2026 06:45
34 lines
2525 bytes
On 10/11/2026 1:13 PM, George Neuner wrote:
> On Sat, 10 Oct 2026 09:45:19 -0000 (UTC), tfb <tfb@work.it.out> wrote:
> 
>> Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote:
>>
>>> I forgot for which programming language MPS was originally designed for,
>>> though I suspect it was ML, and the Ravenbrook website was gone last
>>> time I checked.
>>
>> Dylan, I am almost certain.
> 
> I /don't/ know for certain, but according to its own history MPS was
> developed by Harlequin - which made a Lisp.  Dylan came from Apple.
> 
> 
> https://memory-pool-system.readthedocs.io/en/latest/bib.html#brooksby02

In my defense, I thought it was ML, because their source repository has
MLWorks,

   https://github.com/Ravenbrook/mlworks

but Dylan and Lisp are also strong contenders.  However, upon second
glance at the sources, it looks like it has its own non-MPS garbage
collector at

   https://github.com/Ravenbrook/mlworks/blob/master/src/rts/src/gc.c

so /probably not that/.
-- 
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
Re: Real world switch () with the MPS memory pool system!
#9
Author: tfb
Date: Sun, 11 Oct 2026 07:28
17 lines
2002 bytes
George Neuner <gneuner2@comcast.net> wrote:

> 
> I /don't/ know for certain, but according to its own history MPS was
> developed by Harlequin - which made a Lisp.  Dylan came from Apple.
> 

Harlequin had a Dylan implementation, DylanWorks (I don't remember if it
shipped).  MLWorks was earlier and some of the people who did MPS had
worked on its memory management.  MPS seems to have been developed for
DylanWorks however. 
https://www.ravenbrook.com/project/mps/doc/2002-01-30/ismm2002-paper/ makes
the history reasonably clear.


-- 
tfeb.org/computer/
Re: Real world switch () with the MPS memory pool system!
#10
Author: Johann 'Myrkraverk' Oskarsson
Date: Sun, 11 Oct 2026 07:41
24 lines
2238 bytes
On 10/11/2026 3:28 PM, tfb wrote:
> George Neuner <gneuner2@comcast.net> wrote:
> 
>>
>> I /don't/ know for certain, but according to its own history MPS was
>> developed by Harlequin - which made a Lisp.  Dylan came from Apple.
>>
> 
> Harlequin had a Dylan implementation, DylanWorks (I don't remember if it
> shipped).  MLWorks was earlier and some of the people who did MPS had
> worked on its memory management.  MPS seems to have been developed for
> DylanWorks however.
> https://www.ravenbrook.com/project/mps/doc/2002-01-30/ismm2002-paper/ makes
> the history reasonably clear.
> 
> 

Thank you.  For -- I'm not sure how long -- the Ravenbrook website was
erroring out on me.  And now it works.
-- 
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
Re: Real world switch () with the MPS memory pool system!
#8
Author: George Neuner
Date: Sun, 11 Oct 2026 09:29
26 lines
2382 bytes
On Sun, 11 Oct 2026 07:28:07 -0000 (UTC), tfb <tfb@work.it.out> wrote:

>George Neuner <gneuner2@comcast.net> wrote:
>
>> 
>> I /don't/ know for certain, but according to its own history MPS was
>> developed by Harlequin - which made a Lisp.  Dylan came from Apple.
>> 
>
>Harlequin had a Dylan implementation, DylanWorks (I don't remember if it
>shipped).  MLWorks was earlier and some of the people who did MPS had
>worked on its memory management.  MPS seems to have been developed for
>DylanWorks however. 
>https://www.ravenbrook.com/project/mps/doc/2002-01-30/ismm2002-paper/ makes
>the history reasonably clear.

Ah.  I was not aware that Harlequin had a Dylan implementation. 
Thank you for that!


I have a vague recollection (circa late 90s/early 00s when I was doing
compiler work) that MPS was a library for region memory management
[regions per Tofte, et.al.]  

I didn't see a lot of potential then ... but it has been a long time.
 8-)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads