Hi.
I have encountered reproducible segfault when running my Squeak trunk builds. The segfault occurs with the current latest build (634e4e3) as well as the rather old version used by smalltalkCI (010c20e) on at least macOS 12 and Ubuntu 20.04.
Here's a link to the failing workflow: https://github.com/theseion/Fuel/runs/4036958123?check_suite_focus=true
To reproduce, run the following: ```bash git clone git@github.com:theseion/fuel.git git clone git@github.com:hpi-swa/smalltalkCI.git smalltalkCI/run.sh -s Squeak64-trunk fuel/.tests.ston ```
Smalltalk stack looks okay; at least there are no strange repetitions that might head into an overflow-ish out-of-memory situation.
Here are some interesting stack frames: ``` 0x7ffd3b660328 M ClassForTestToBeDeleted91>fuelAccept: 0x2ca5c28: a(n) ClassForTestToBeDeleted91 ... 0x7ffd3b681f20 M FLCurrentContext class(DynamicVariable class)>value:during: 0x6a1ec98: a(n) FLCurrentContext class ... 0x7ffd3b682280 I FLHookedSubstitutionTest>testClassWithCachedValueByNil 0x6f359e8: a(n) FLHookedSubstitutionTest ... ```
Here are some wild guesses: - Maybe some issues in the area of class creation/deletion? - Maybe some issues with our recent changes to process termination and #ensure: blocks? ("Most recent primitives" shows #findNextHandlerContextStarting, #findNextUnwindContextUpTo:)
[crash.dmp.txt](https://github.com/OpenSmalltalk/opensmalltalk-vm/files/7439537/crash.dmp.tx...)
I've identified a `super` send that is causing issues. I build the class myself via `ClassBuilder` but I might be doing something special there, so I will have to keep digging.
Found it! I was accidentally writing a class as the method class literal into a compiled method. This is usually an association (or `ClassBinding`). This explains the segfault upon `super` send.
The reason this only showed up in trunk is that i had a correct `Environment>>associationAt:ifAbsent:` but not for `#bindingOf:ifAbsent:`, which, in trunk, is the new message send in `Class>>binding`.
I'm closing this issue. Here's an MWE in case you want to do something with the segfault:
```smalltalk | class method | Object subclass: #Foo instanceVariableNames: 'env' classVariableNames: '' poolDictionaries: '' category: 'Bar'.
class := Smalltalk at: #Foo. class compile: 'printString super prinstString'.
method := (Smalltalk at: #Foo) compiledMethodAt: #printString. method literalAt: method numLiterals put: class. class new printString ```
Closed #601.
Cool, well found!
_,,,^..^,,,_ (phone)
On Oct 30, 2021, at 7:33 AM, Max Leske ***@***.***> wrote:
Found it! I was accidentally writing a class as the method class literal into a compiled method. This is usually an association (or ClassBinding). This explains the segfault upon super send.
The reason this only showed up in trunk is that i had a correct Environment>>associationAt:ifAbsent: but not for #bindingOf:ifAbsent:, which, in trunk, is the new message send in Class>>binding.
I'm closing this issue. Here's an MWE in case you want to do something with the segfault:
| class method | Object subclass: #Foo instanceVariableNames: 'env' classVariableNames: '' poolDictionaries: '' category: 'Bar'.
class := Smalltalk at: #Foo. class compile: 'printString super prinstString'.
method := (Smalltalk at: #Foo) compiledMethodAt: #printString. method literalAt: method numLiterals put: class.
class new printString — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
vm-dev@lists.squeakfoundation.org