|
From: Adam G. <ar...@cy...> - 2003-04-08 10:56:15
|
At 03:00 08/04/03 -0700, Jeremy Fitzhardinge wrote: >Quoting Julian Seward <js...@ac...>: > >> >> I've spent the afternoon messing with R H 9. Graydon and Jeff have >> done a great job telling me useful stuff for getting V to work on >> RH9, and thanks to them for that. >> >> So it sort-of works. Unfortunately OpenOffice hangs, due to an >> accept() >> call which isn't correctly routed to V's only-this-thread-blocks >> implementation thereof, and so the whole app hangs. Sigh. I think it >> might be due to ld.so in 9 ignoring -z initfirst. > >At least one possible problem is that if two things have initfirst - well, they >can't both be first. > >> It's all a swamp, and V is getting more and more cluttered with stuff >> to work around this kind of problem. JeremyF's vg_intercept.c thing >> is the latest addition. > >And it is well ugh-worthy. > >> 1. We can't really simulate the native posix threading libraries; > >What do you mean by "simulate"? Do you mean we can emulate the presence of the >library, but we can't run a simulation of the actual library? > >What we could do is move Valgrind's thread simulation an abstraction level down, >and intercept the clone system call, and then run the "real" thread library on >that. Unfortunately that loses the higher-level insight Valgrind gets into the >threading behaviour of the target program. clone() implementation patch available on request... ;-) this is exactly what I did for valgrind's WINE support. there are several problems with implementing clone() using 'green' threads - the biggest one is that external processes cannot send signals to the new threads (it's causing major headaches trying to get patches into WINE to cope with this). if you want to REALLY clone a new thread, then you'll have to add all sorts of locking to valgrind to cope with it - I had a look at this but it appears to be a big job. currently valgrind itself is pretty much single threaded - with real cloned threads that won't be the case. Seeya, Adam -- Real Programmers don't comment their code. If it was hard to write, it should be hard to read, and even harder to modify. These are all my own opinions. |