mit-scheme-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MIT-Scheme-devel] LIARC in the new microcode


From: Taylor R Campbell
Subject: [MIT-Scheme-devel] LIARC in the new microcode
Date: Mon, 22 Jan 2007 03:37:52 +0000
User-agent: IMAIL/1.21; Edwin/3.116; MIT-Scheme/7.7.90.+

I tried to get the C back end running on the new microcode today, and
stumbled into two problems.  The first seemed to be easy to fix, but
the second halted my progress, which I'll resume later.

In the old microcode, information is split between compiled_entries
and compiled_blocks_table, each of which is an array of structs.  In
the new microcode, presumably intended as an optimization,
compiled_entries is an array of pointers to the compiled_blocks table,
which contains all the information.

If these tables expand beyond their capacity, they are grown using
`realloc' to allocate more storage for them.  But in the new
microcode, if `realloc' returns a different address, all of the
pointers composing compiled_entries need to be adjusted.  Adding some
code to adjust compiled_entries after the `realloc', if the new
address is not equal to the old address, seemed to fix it
provisonally, although I don't know what other code might depend on
this.

After that, I was able to get into runtime_make up to the point where
it transfers control to the contents of an execution cache (for
*MAKE-ENVIRONMENT), at which point it segfaults.  However, stepping
through the old microcode and the new microcode, it seems that a
different value is stored in the linkage section altogether before it
is even run through the linker.  I suspect that this indicates a bug
in the new microcode's unstackifier, but I haven't examined that code
closely enough to be able to say anything with certainty about it.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]