chromatic wrote:

+    if (saved_log_data == NULL)
+        return;
+
     saved = saved_log_data;
     mem_sys_free(saved->reads);
     mem_sys_free(saved->writes);

I'm not sure this is the right fix; there's little reason to use an STMLog PMC if it doesn't get a valid transaction log. My vote is for the PMC's init() to throw an exception.

If that's not the case, then at least both of Parrot_STM_mark_extracted() and Parrot_STM_replay_extracted() need similar null guards.

It makes sense here to return with no action, since all the routine does is free memory. If the memory wasn't used, it doesn't need to be freed.

'replay_extracted' already has the same guard, just before it starts using 'saved'. In that case it makes sense too, since being null means there's nothing to replay.

'mark_extracted' should have the guard added. The same one should work. As intended, it is marking all the read_records and write_records. There just happen to be none to mark.

Allison

Reply via email to