bugMIT/GNU Scheme - Bugs: bug #31431, Cold loading fails during c ->...

 
 

bug #31431: Cold loading fails during c -> native compilation

Submitter:  None
Submitted:  Sun 24 Oct 2010 04:46:17 AM UTC
   
 
Category:  runtime Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect behavior
Status:  Fixed Privacy:  Public
Assigned to:  riastradh Originator Name:  William Throwe
Originator Email:  -email is unavailable- Open/Closed:  Closed
Keywords: 
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 24 Oct 2010 06:45:37 PM UTC, comment #2: 

Builds fine.  Thanks.

And, no, I don't actually need make-native.sh for anything.  I was just experimenting with the build system.

Anonymous
Sun 24 Oct 2010 06:32:28 AM UTC, comment #1: 

I'm always nervous rearranging the cold load, so I've made a simpler change in Git commit 22e805300d837b87b885ecaa4c81d69582cd3f63, to omit the check that needs to find procedures' arities; there is very little benefit to that check anyway.  Let me know how the build goes now.

By the way, are you just checking whether make-native.sh still works, or do you actually need it for something?

Taylor R. Campbell <riastradh>
Group Member
Sun 24 Oct 2010 04:46:17 AM UTC, original submission:  

When running etc/make-native.sh to build a native code scheme from a portable c scheme, the first attempt to run the native microcode (run_cmd in runtime/: ../microcode/scheme --library ../lib --fasl make.bin --heap 6000) crashes with

initialize: (runtime 2d-property)
initialize: (runtime hash-table)
Microcode Error: No error handlers.
Error code 0x2 (unassigned-variable).

followed by a stack trace.  (Full log of run attached.)  The problem first appeared in git commit a5e7841fdf715eeadde26e2e21261ec0e5c34ea8.

The problem appears to be that the (runtime hash-table) initialize-package! function ends up indirectly calling some functions from (runtime lambda-abstraction), which has not been initialized at that point.  Swapping the order of initialization in runtime/make.scm fixes the problem.  (Actually, I swapped the entire "Basic data structures" and "Microcode data structures" sections in order to keep each one together.)  Patch attached.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #21782:  make-native.out added by None (251KiB - application/octet-stream - Output of etc/make-native.sh and a patch fixing the problem.)
file #21783:  mit-scheme-cold-load.patch added by None (1KiB - application/octet-stream - Output of etc/make-native.sh and a patch fixing the problem.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by riastradh (Posted a comment)
  • -email is unavailable- added by None (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.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-10-24 riastradh StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2010-10-24 riastradh StatusNone Ready For Test
        Assigned toNone riastradh
    2010-10-24 None Attached File- Added make-native.out, #21782
        Attached File- Added mit-scheme-cold-load.patch, #21783

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code