Hi Cyril:

On 10/06/2011 08:44 AM, Wanlong Gao wrote:

> On 10/05/2011 11:36 PM, Cyril Hrubis wrote:
> 
>> 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.
>>
> 
> 
> Sure, but I saw that when read_mem() goes first and become the first running
> thread, it should cause segment fault all the time now.
> 
> So, if the first running thread is not read_mem(), it will not fail with 
> segment
> fault all the time. So, I think there's no wrong with the signal or others' 
> handling.
> 
> We just make sure that read_mem() is not the first running thread, it will be 
> enough.


Any comment ?

Thanks

> 
> Thanks
> -Wanlong Gao
> 
> ------------------------------------------------------------------------------
> 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
> 



------------------------------------------------------------------------------
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

Reply via email to