Hi Nilay,

Is there any chance you could elaborate on the specific case here? I think
that'd be much easier to grasp than the abstract A, B, C.

Thanks,

Andreas

On 07/02/2013 22:31, "Nilay" <[email protected]> wrote:

>I am testing some thing related to parallelization stuff and I ran into
>problem. I have a global object A that is an instance of some class B. The
>class has a member C which is a pointer to another object D. In the
>constructor for class B, dynamically memory is allocated and the address
>is stored in C. Since A is a global object, so the constructor is called
>very early (before the sim_objects have been constructed in C++ code). The
>object A was being used somewhere in the construction of some sim_object.
>The execution incurred a segmentation fault when it tried to access the
>memory pointed to by C. In fact gdb tells me that the value in C is 0x0.
>
>Is such behaviour expected? Or is it that I am doing something wrong and
>not able to make out the error I am doing?
>
>--
>Nilay
>
>_______________________________________________
>gem5-dev mailing list
>[email protected]
>http://m5sim.org/mailman/listinfo/gem5-dev
>


-- IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium.  Thank you.

_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to