Fixed horrendous crash in the JIT from packing change in the debug table (bug 3334, r=me).

I accidentally changed the debug table packing in a commit a while ago.  This explains the nonsense debug output and crashes people have been getting on the 1.1 branch.  Fortunately this is (mostly) detectable via the "debug.natives" table and the JIT will unpack symbols based on that information.
This commit is contained in:
David Anderson
2008-10-27 02:02:14 -05:00
parent e48bba5b4d
commit 8d78c74554
6 changed files with 155 additions and 42 deletions
+9
View File
@@ -69,6 +69,11 @@ int BaseRuntime::CreateFromMemory(sp_file_hdr_t *hdr, uint8_t *base)
plugin->base_size = hdr->imagesize;
set_err = SP_ERROR_NONE;
if (hdr->version == 0x0101)
{
plugin->debug.unpacked = true;
}
/* We have to read the name section first */
for (sectnum = 0; sectnum < hdr->sections; sectnum++)
{
@@ -195,6 +200,10 @@ int BaseRuntime::CreateFromMemory(sp_file_hdr_t *hdr, uint8_t *base)
{
plugin->debug.stringbase = (const char *)(base + secptr->dataoffs);
}
else if (strcmp(nameptr, ".dbg.natives") == 0)
{
plugin->debug.unpacked = false;
}
secptr++;
sectnum++;