Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cluster "Illegal" still not implemented #12

Open
cryptax opened this issue May 16, 2023 · 0 comments
Open

Cluster "Illegal" still not implemented #12

cryptax opened this issue May 16, 2023 · 0 comments

Comments

@cryptax
Copy link

cryptax commented May 16, 2023

Hi - I know you're no longer supporting this project, but I've started looking into what modifications it would need for new versions.
I've fixed a couple of obvious things like the hash, snapshot kind (as mentioned in issue #8), but I'm having an issue with CIDs.

    raise ParseError(self.data_offset + self.data.tell(), 'Cluster "{}" still not implemented'.format(handler))
darter.core.ParseError: (719, 'Cluster "Illegal" still not implemented')

The VM snapshot has byte 0xc0 where we should read the first Cid, and that reads into value 0, which corresponds to Cid "Illegal". Any idea what's causing this? I'd love to hear if there's a detailed document on snapshot structure (byte per byte)...

From my understanding, the serialization of clusters has slightly changed and no longer begins with the CID, but with a predefined count, then CID, then object count. When I fix this, the parsing crashes in the next cluster

[000002d1]: DEBUG: read_cluster(): predef_count=64 cid=185 object_count=0
[000002d7]: DEBUG: read_cluster(): predef_count=2 cid=-62 object_count=0
raise ParseError(self.data_offset + self.data.tell(), 'Cluster "{}" still not implemented'.format(handler))
darter.core.ParseError: (727, 'Cluster "FfiInt32" still not implemented')

I thought perhaps Cid 0 was now valid, but no, source code still specifies it as invalid.

enum ClassId : intptr_t {
  // Illegal class id.
  kIllegalCid = 0,

My non-fonctional fork is here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant