Hi! > If read_mem() goes before *map_address* has been mapped, dereference > to the *map_address*(nul) will cause the Segment Fault. > > So, let read_mem() yield the CPU when *map_address* hasn't been mapped. >
I've been reading the test sourece lately and IMHO this is wanted behavior. As far as I understand the code the test creates two threads one to read and one to map/unmap the memory concurently. Look for the setjmp() and longjmp() in the read_mem() and signal handler that is expected to do exactly what you are trying to achieve. So if the test fails with segmentation fault, there is something wrong with the signal/longjmp handling. -- Cyril Hrubis [email protected] ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
