Skip to content

Comments

Help detect when relacy_std is not included first#38

Merged
dvyukov merged 1 commit intodvyukov:masterfrom
ccotter:detect-not-first-include
Jan 21, 2026
Merged

Help detect when relacy_std is not included first#38
dvyukov merged 1 commit intodvyukov:masterfrom
ccotter:detect-not-first-include

Conversation

@ccotter
Copy link
Contributor

@ccotter ccotter commented Jan 20, 2026

No description provided.

@ccotter ccotter force-pushed the detect-not-first-include branch from f7bb5c7 to b0296bf Compare January 20, 2026 18:00
@dvyukov
Copy link
Owner

dvyukov commented Jan 21, 2026

CI passed -- easier to merge. Thanks!

@dvyukov dvyukov merged commit 7729b24 into dvyukov:master Jan 21, 2026
4 checks passed
@ccotter ccotter deleted the detect-not-first-include branch January 21, 2026 15:52
@ccotter
Copy link
Contributor Author

ccotter commented Jan 21, 2026

CI passed -- easier to merge. Thanks!

Yes! In fact, my original attempt at this broke the C++11 build and CI caught it, since I had only tested C++23 locally.

@ChrisMThomasson
Copy link

ChrisMThomasson commented Jan 21, 2026 via email

@dvyukov
Copy link
Owner

dvyukov commented Jan 22, 2026

Well, I am an old school relacy user from back in comp.programming.threads when it was being developed.

I can attest to that 🙂

@ChrisMThomasson
Copy link

ChrisMThomasson commented Jan 28, 2026 via email

@dvyukov
Copy link
Owner

dvyukov commented Feb 3, 2026

Well, I am an old school relacy user from back in comp.programming.threads when it was being developed.

I can attest to that 🙂

It was a fun time back then!

Indeed!

Btw, what is the most recent version of Relacy? I have an older one that works fine.

Now it's just on github with "continuous release".
You can always pull the latest version from https://github.com/dvyukov/relacy.git
@ccotter kindly contributed github actions that build/test every commit, so hopefully it even works :)

Btw, did you ever model futex?

No, I don't think so.

I think you might have already. Also, rl:: namespace is fine. Perhaps Relacy should not be trying to inject itself into the std namespace?

I think that's useful to make fewer changes to the existing code.

@ChrisMThomasson
Copy link

ChrisMThomasson commented Feb 3, 2026 via email

@dvyukov
Copy link
Owner

dvyukov commented Feb 9, 2026

Fwiw, I created a little test for a highly experimental stack mixed with a mutex. It uses a futex, but I wanted to test it in Relacy. Alas, no futex. Just busy doing other things. Fwiw, here is my code in question:

Mr lock-free strikes back! 🙂

For ThreadSanitizer race detector we did proper compiler instrumentation and runtime support. It does not require any code changes whatsoever. But it always lacked more precise memory model simulation and random scheduling.

Ideally there is only one tool that can do both (nice compiler instrumentation + memory model + scheduling).

@ccotter already kindly started adding better scheduling to TSan (note to myself: review it!):
llvm/llvm-project#178836

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants