pharo-project / pharo

Pharo is a dynamic reflective pure object-oriented language supporting live programming inspired by Smalltalk.
http://pharo.org
Other
1.2k stars 355 forks source link

Stepping Over a method returning self hangs the image #8888

Closed tesonep closed 3 years ago

tesonep commented 3 years ago

Bug description When doing a step over on a message send that is returning self (it is a quick primitive it hangs). Maybe it is the same for other quick primitives.

To Reproduce Steps to reproduce the behavior:

  1. Debug any test.
  2. Restart in the method #performTest.
  3. Click Over many times
  4. See the explotion.

Expected behavior Do the step over.

Version information:

tesonep commented 3 years ago
VM: Mac OS - x86_64 - 1000 - CoInterpreterWithQueueFFI VMMaker-tonel.1 uuid: d59394af-ef6d-0d00-8bb5-685302a40187 Oct 13 2020
StackToRegisterMappingCogit VMMaker-tonel.1 uuid: d59394af-ef6d-0d00-8bb5-685302a40187 Oct 13 2020
e829a1da - Commit: e829a1da - Date: 2020-10-13 15:43:09 +0200

Image: Pharo9.0.0 [Build information: Pharo-9.0.0+build.1243.sha.69cb7b458ac9d7ff4c7f87eccee1d24a7df8fea1 (64 Bit)]

Context>>cannotReturn:
    Receiver: Context>>jump
    Arguments and temporary variables: 
        result:     ni
    Receiver's instance variables: 
        sender:     ByteSymbol(Symbol)>>asSymbol
        pc:     nil
        stackp:     2
        method:     Context>>#jump
        closureOrNil:   nil
        receiver:   ByteSymbol(Symbol)>>asSymbol

Context>>jump
    Receiver: ByteSymbol(Symbol)>>asSymbol
    Arguments and temporary variables: 
        top:    ni
    Receiver's instance variables: 
        sender:     nil
        pc:     nil
        stackp:     0
        method:     Symbol>>#asSymbol
        closureOrNil:   nil
        receiver:   #testBroadenFilterAfterFetchCompletionShouldBroadenResultsWhenCaseIns...etc...

ByteSymbol(Symbol)>>asSymbol
    Receiver: #testBroadenFilterAfterFetchCompletionShouldBroadenResultsWhenCaseInsensitve
    Arguments and temporary variables: 

    Receiver's instance variables: 
#testBroadenFilterAfterFetchCompletionShouldBroadenResultsWhenCaseInsensitve
guillep commented 3 years ago

We found a way to reproduce it:

Boom

Alisu commented 3 years ago

I just tried the #foo asSymbol steps on a new Pharo9.0 image with headless vm and my image doesn't hang. I did get the restart quick method smash stack by restarting inside asSymbol by misfollowing the step the first time.

PS: Reading #8897 is important. I dunno if the revert happened.

dionisiydk commented 3 years ago

Can't reproduce the current image. But I am very convinced that the image would not hang in such case if my PR will be included (https://github.com/pharo-project/pharo/pull/8567). The debugger would crash but not a full image hang

пт, 26 мар. 2021 г. в 17:06, Guille Polito @.***>:

We found a way to reproduce it:

  • Type the following in a playground #foo asSymbol
  • Debug it
  • Step into asSymbol
  • Step over (that will step out back to the original context)
  • Restart
  • Step over

Boom

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pharo-project/pharo/issues/8888#issuecomment-808376602, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6FVID57L25JQXRRTHQBDTTFS5HNANCNFSM4Z3GVFTA .