Quote:
Originally Posted by
afroze
Thans 4 ur concern
My actual problem is below one. And iam not getting any idea please help me in this
" Developing a script to detect race conditions in a given library or code using multi-thread programming "
Script to detect race conditions in a given library or code? So you want something that will load the library or disassemble the library and search for possible race conditions? You also want that script to analyze plain code for race conditions? This is FAR from being simple. I'll post the possible solutions:
1) use some program (example: objdump) to disassemble the whole library and simply use regex to search for unsafe calls/interrupts.
2) load/use the library (dlopen/dlsym/dlclose) in thread1 and use thread2 to analyze calls for open() with ptrace() to check if there is any possible race condition.
3) Why is multi-threading an issue? Is this homework?