variorum icon indicating copy to clipboard operation
variorum copied to clipboard

msr_core: allocate_batch() does not handle subsequent calls correctly

Open rountree opened this issue 4 years ago • 0 comments

allocate_batch() works under the assumption that all msr ops in a batch will be allocated at once. Subsequent calls to allocate_batch() will overwrite the previous operations and print the cryptic error message "Conflicting batch pointers". We can make subsequent calls be additive or we can prevent them, but allowing them (even with an error message) is worse than the other two options.

The more I think about it, the more I don't want an explicit allocation call to occur in the *_features.{c|h} files. The call to load_*_batch() (renamed add_batch_op()?) should probably result in msr_core.c managing the memory allocation. Yes, it's slightly faster to do a single allocation, but this is initialization code so it doesn't matter.

rountree avatar Mar 26 '20 07:03 rountree