Skip to content

ffi.error: struct x86_regs: wrong size for field 'cs_arbytes' (cdef says 4, but C compiler says 8). #77

Description

@cotic

In -> fix_vmi_event_version branch (I have not tried the other branches yet).

Running -> python3 singlestep-event.py win7-hvm

I get the following error:

WaitingforeventsExceptionignoredfromcfficallback<functiongeneric_event_callbackat0x7f52a4724af0>:
Traceback (mostrecentcalllast):
File"/home/andrew/Documents/python-virtual-environments/LibVMI/lib/python3.8/site-packages/libvmi-3.5-py3.8-linux-x86_64.egg/libvmi/event.py", line72, ingeneric_event_callbackevent_response=event.py_callback(event.vmi, event)
File"singlestep-event.py", line25, incallbackpprint(event.to_dict())
File"/home/andrew/Documents/python-virtual-environments/LibVMI/lib/python3.8/site-packages/libvmi-3.5-py3.8-linux-x86_64.egg/libvmi/event.py", line239, into_dictd=super().to_dict()
File"/home/andrew/Documents/python-virtual-environments/LibVMI/lib/python3.8/site-packages/libvmi-3.5-py3.8-linux-x86_64.egg/libvmi/event.py", line141, into_dict'rax': hex(self.x86_regs.rax),
ffi.error: structx86_regs: wrongsizeforfield'cs_arbytes' (cdefsays4, butCcompilersays8). fixitoruse"...;"asthelastfieldinthecdefforstructx86_regstomakeitflexible

The C version of the same example appears to work fine :

Waiting for events...
Single-step event: VCPU:0 GFN 26ca GLA 00000000826ca5a6
Waiting for events...
Single-step event: VCPU:0 GFN 26ca GLA 00000000826ca5b0
Waiting for events...
Single-step event: VCPU:0 GFN 26ca GLA 00000000826ca5b4
Waiting for events...
Single-step event: VCPU:0 GFN 26ca GLA 00000000826ca5b8
Waiting for events...
Single-step event: VCPU:0 GFN 26ca GLA 00000000826ca5bd

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions