Subject: bug#19883: Correction for backtrace

From: [email-masked] (Ludovic Courtès)
Date: Thu, 23 Jun 2016 15:12:34 +0200

Andy Wingo <[email-masked]> skribis:

> On Thu 26 Feb 2015 16:30, David Kastrup <[email-masked]> writes:
>
>> Try ./test 2 2000 200
>
> I can reproduce the crash with your test case, thanks :) The patch below
> fixes the bug for me.  WDYT Ludovic?
>
> Andy
>
> commit db30120fc3a1727d8f221cbb014314f2babf841e
> Author: Andy Wingo <[email-masked]>
> Date:   Thu Jun 23 11:47:42 2016 +0200
>
>     Fix race between SMOB marking and finalization
>     
>     * libguile/smob.c (clear_smobnum): New helper.
>       (finalize_smob): Re-set the smobnum to the "finalized smob" type
>       before finalizing.  Fixes #19883.
>       (scm_smob_prehistory): Pre-register a "finalized smob" type, which has
>       no mark procedure.

This LGTM, nice hack!

Do you think the test case could be added to the test suite somehow?

Thank you,
Ludo’.