Closed kazarmy closed 1 week ago
298605f8677c008c36bb469b865745b25525d4e1 98f728c7185303b786df25d1919da187dd0d3f07 tested via rz-test -t 1 db/archos/linux-x64/dbg_gdbserver_rebase
... 298605f8677c008c36bb469b865745b25525d4e1 caused the data race warning to reappear
Doesn't seem to help the assembly test on macOS:
[XX] db/asm/java <asm> newarray int
-- <asm> newarray int <--> bc0a
-- assembly
Just noticed this killpipe
pairing:
https://github.com/rizinorg/rizin/blob/a3ffd6e38104fccc2504d371cd383765274e015c/librz/util/subprocess.c#L810
https://github.com/rizinorg/rizin/blob/a3ffd6e38104fccc2504d371cd383765274e015c/librz/util/subprocess.c#L1328-L1331
so there does appear to be read/write synchronization on proc->ret
despite the protestations of TSan, so closing this.
[XX] db/asm/tricore <asm> add.f d1, d7, d12
-- <asm> add.f d1, d7, d12 <--- 6b0c2117 ---> <IL>
-- IL
--- expected
+++ actual
I think that's it for now ... 85089d08a6119f23c8f2b058093f68961c271135 is inelegant but the CI failure of 7b8ed9e4b8c974a6d505bf16f60ec3c11d3c5e5b suggests that there's something wrong with the original way of doing things (i think). Even if this pr doesn't fix the macos asm test problem, it does have 2 things going for it:
I think that's it for now ... 85089d0 is inelegant but the CI failure of 7b8ed9e suggests that there's something wrong with the original way of doing things (i think). Even if this pr doesn't fix the macos asm test problem, it does have 2 things going for it:
1. The warning in the [pr description](https://github.com/rizinorg/rizin/pull/4545#issue-2342038472) goes away. 2. Isn't a semaphore more lightweight than a pipe?
i strongly think the main issue is how we fork and execute. the whole thing in sys.c
is very nasty
i did consider whether pipes were being closed a bit too soon, but that's a quest for another day i suppose
Your checklist for this pull request
Detailed description
This pr fixes the following
proc->ret
data race, as mentioned on Mattermost:(The above was obtained using gcc TSan on Ubuntu 22.04 -- this build is broken regarding subprocesses in places not related to this pr, such as in
!
)Hopefully, this fixes the problem with macos asm tests as well.
Test plan
All builds are green.
Closing issues
...