Allocating here is still the safest, given the internals of g_int_hash and
g_int_equal (they dereference).


On Sun, May 5, 2013 at 4:02 PM, Tamas K Lengyel <notifications@github.com>wrote:

> In libvmi/events.c:
>
> > @@ -128,6 +133,24 @@ status_t vmi_register_event (vmi_instance_t vmi,
> >              }
> >
> >              break;
> > +        case VMI_EVENT_SINGLESTEP:
> > +            for(;vcpu<vmi->num_vcpus;vcpu++) {
> > +                if(CHECK_VCPU_SINGLESTEP(event->ss_event, vcpu)) {
> > +                    if(NULL!=g_hash_table_lookup(vmi->ss_events, &vcpu)) {
> > +                        dbprint("An event is already registered on this vcpu: %u\n", vcpu);
> > +                    } else {
> > +                        if(VMI_SUCCESS == driver_start_single_step(vmi, event->ss_event)){
> > +                            vcpu_i = malloc(sizeof(uint32_t));
>
> Sorry, I think this was a false alarm and just inserting with &vcpu works
> fine. I must have had some other issue when I had that error.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/bdpayne/libvmi/pull/46/files#r4087460>
> .
>