bugMIT/GNU Scheme - Bugs: bug #66115, Running format on a record type...

 
 

bug #66115: Running format on a record type causes later output to fail

Submitter:  Arthur A. Gleckler <aag>
Submitted:  Tue 20 Aug 2024 03:23:55 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Open
Keywords: 
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 20 Aug 2024 03:23:55 PM UTC, original submission:  

Printing record types using format now has the side effect that future printing will signal errors.  This bug makes debugging other bugs hard because it's impossible to move up the stack.  Here's a transcript of the simplest reproducible test case I could find:

+VERBATIM+
Copyright (C) 2022 Massachusetts Institute of Technology
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Image saved on Monday August 19, 2024 at 10:33:04 PM
  Release 13.0.50 || SF || LIAR/x86-64

1 ]=> (load-option 'format)
;Loading "format.com"... done
;Value: format

1 ]=> (load-option 'sos)
;Loading "load.scm"...
;  Loading "sos-unx.pkd"... done
;  Loading "geneqht.com"... done
;  Loading "generic.com"... done
;  Loading "genmult.com"... done
;  Loading "tvector.com"... done
;  Loading "recslot.com"... done
;  Loading "slot.com"... done
;  Loading "class.com"... done
;  Loading "instance.com"... done
;  Loading "method.com"... done
;  Loading "printer.com"... done
;  Loading "macros.com"... done
;... done
;Value: sos

1 ]=> (format #true "~A" <bundle>)
#[record-type 12 <bundle>]
;Unspecified return value

1 ]=> <generic-procedure>
;Value:
;The object
;To continue, call RESTART with an option number:
; (RESTART 1) => Return to read-eval-print level 1.

2 error>
-VERBATIM-

Note that it's not necessary to print <bundle> or <generic-procedure> in particular.  Passing an instance of any record type to format will cause the bug in future printing.

I've only been able to reproduce this bug with SOS loaded.  The XML parsing library uses SOS, so this makes using that problematic.

The bug appeared (thanks, git bisect) somewhere between 3b536b9f5 and 8d244e6c0.  I can't be sure exactly which commit introduced the bug because all the builds in that range were broken before 8d244e6c0, at least in my testing.  I'm guessing that they were all part of one effort.

8d244e6c0 * Tweaks. [This one  builds.]
aa2f322b0 * Clear handler cache even on overwrites.
10cec1ac2 * Change calling convention for %make-tag.
122b8419f * Change UCD character sets to use their built-in predicates.
22e3ed00d * Simplify %record->leaf-type.
8b52e11ea * Change types to have subset links, and remember simple types.
61e11c4af * Revamp the representation of types.
3b536b9f5 * Initial draft of type-dispatcher.

Arthur A. Gleckler <aag>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by aag (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-5884.
    Corresponding source code