WeakMessageSend is broken?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

WeakMessageSend is broken?

Aliaksei Syrel
Assume we have the following weak message send:

message := WeakMessageSend 
   receiver: Morph new
  selector: #color.
100000 timesRepeat: [ message value ]

If you execute it in latest Pharo and VM  you will (almost 100% sure) get DNU. (but it should just return nil if receiver is garbage collected)

How can I ensure that it selector is not being sent to nil?

http://ws.stfx.eu/6QOWBLQENVIY

Am I doing something wrong?

Cheers,
Alex
Reply | Threaded
Open this post in threaded view
|

Re: WeakMessageSend is broken?

stepharo
Hi aliaksei

I do not know. Now I know that last week guille was trying to understand memory leaks
and they all were around Weak structures

Stef

Le 28/3/16 21:08, Aliaksei Syrel a écrit :
Assume we have the following weak message send:

message := WeakMessageSend 
   receiver: Morph new
  selector: #color.
100000 timesRepeat: [ message value ]

If you execute it in latest Pharo and VM  you will (almost 100% sure) get DNU. (but it should just return nil if receiver is garbage collected)

How can I ensure that it selector is not being sent to nil?

http://ws.stfx.eu/6QOWBLQENVIY

Am I doing something wrong?

Cheers,
Alex

Reply | Threaded
Open this post in threaded view
|

Re: WeakMessageSend is broken?

Aliaksei Syrel
Submitted an issue


Cheers,
Alex

On Mon, Mar 28, 2016 at 9:29 PM, stepharo <[hidden email]> wrote:
Hi aliaksei

I do not know. Now I know that last week guille was trying to understand memory leaks
and they all were around Weak structures

Stef

Le 28/3/16 21:08, Aliaksei Syrel a écrit :
Assume we have the following weak message send:

message := WeakMessageSend 
   receiver: Morph new
  selector: #color.
100000 timesRepeat: [ message value ]

If you execute it in latest Pharo and VM  you will (almost 100% sure) get DNU. (but it should just return nil if receiver is garbage collected)

How can I ensure that it selector is not being sent to nil?

http://ws.stfx.eu/6QOWBLQENVIY

Am I doing something wrong?

Cheers,
Alex


Reply | Threaded
Open this post in threaded view
|

Re: WeakMessageSend is broken?

Aliaksei Syrel
In reply to this post by stepharo
I do not know. Now I know that last week guille was trying to understand memory leaks
and they all were around Weak structures

Without going forward and bugs there is no progress :)

Cheers,
Alex

On Mon, Mar 28, 2016 at 9:29 PM, stepharo <[hidden email]> wrote:
Hi aliaksei

I do not know. Now I know that last week guille was trying to understand memory leaks
and they all were around Weak structures

Stef

Le 28/3/16 21:08, Aliaksei Syrel a écrit :
Assume we have the following weak message send:

message := WeakMessageSend 
   receiver: Morph new
  selector: #color.
100000 timesRepeat: [ message value ]

If you execute it in latest Pharo and VM  you will (almost 100% sure) get DNU. (but it should just return nil if receiver is garbage collected)

How can I ensure that it selector is not being sent to nil?

http://ws.stfx.eu/6QOWBLQENVIY

Am I doing something wrong?

Cheers,
Alex