concurrencykit / ck

Concurrency primitives, safe memory reclamation mechanisms and non-blocking (including lock-free) data structures designed to aid in the research, design and implementation of high performance concurrent systems developed in C99+.
http://concurrencykit.org/
Other
2.34k stars 312 forks source link

ck_pr/aarch64: Specify output operands for ck_pr_md_store_* #215

Closed markjdb closed 6 months ago

markjdb commented 8 months ago

This is required to enable KMSAN for aarch64 on FreeBSD. It will likely also be useful for userspace code which makes use of CK and is compiled with MSAN enabled.

markjdb commented 6 months ago

Hello, is there any interest in taking this PR? It's useful when CK is used with code instrumented by MSAN and is low-risk otherwise.

cognet commented 6 months ago

Hi @markjdb, sorry about that, I just forgot, it is now merged, thank you!

markjdb commented 6 months ago

Hi @markjdb, sorry about that, I just forgot, it is now merged, thank you!

Thank you! Can I simply cherry-pick this into FreeBSD?

cognet commented 6 months ago

Yes, please do

markjdb commented 6 months ago

@cognet I'm very sorry, I just realized that this commit doesn't exactly match the one I'm using in FreeBSD. It's not right. Could you please revert, and I'll submit the updated patch? I'm sorry again.

cognet commented 6 months ago

@markjdb done! Out of curiosity, what's wrong with this one?

markjdb commented 6 months ago

Thanks. I failed to adjust the indexes of the operands in the actual assembly. Now that there's an output operand, %0 becomes %1, %1 becomes %2. I'm running the test suite on an arm64 board now just to confirm that I didn't miss something else.

cognet commented 6 months ago

Oh of course, I wonder how I missed that

markjdb commented 6 months ago

I resubmitted the corrected and properly tested patch in #216.