Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

primitiveContextAt[put] (210/211) fail for stackp >= 16 in some situations #162

Open
LinqLover opened this issue May 25, 2022 · 3 comments
Labels

Comments

@LinqLover
Copy link
Collaborator

Practical example to reproduce:

  • Debug it: Object newSubclass
  • Step Through
  • Error: subscript is out of bounds: 16 from Context>>at:put: (ClassBuilder>>superclass:subclass:instanceVariableNames:classVariableNames:poolDictionaries:category: @ 93)

Minimal example to debug:

Object subclass: #TestObject
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'as yet unclassified'.
TestObject compile: 'a: a b: b c: c d: d e: e f: f g: g h: h i: i j: j k: k l: l m: m n: n o: o ^ a'
Process forBlock: [TestObject basicNew a: 1 b: 2 c: 3 d: 4 e: 5 f: 6 g: 7 h: 8 i: 9 j: 10 k: 11 l: 12 m: 13 n: 14 o: 15] runUntil: [:ctx | self haltIf: ctx stackPtr = 15. false]

Interestingly, primitiveAt[Put] (60/61) still work in the situation.

@fniephaus fniephaus added the bug label May 25, 2022
@fniephaus
Copy link
Member

I'm not sure I want to know how you found this but thanks for raising the issue! :)

So it seems that your dummy method forces a large frame and then primitiveContextAt[Put] fail, interesting. Is this blocking you on anything?

@LinqLover
Copy link
Collaborator Author

I'm not sure I want to know how you found this but thanks for raising the issue! :)

I stumbled upon this during #163. :)

Is this blocking you on anything?

Not really, I was just playing around with TruffleSqueak a bit ... Looks like #163 is a larger issue anyway that will hinder me from working with SimulationStudioin TruffleSqueak. But I was not having any concrete plans other than fuzz-testing. :)

@fniephaus
Copy link
Member

fniephaus commented May 25, 2022

But I was not having any concrete plans other than fuzz-testing.

Right, there are still some critical SUnit tests that don't pass such as:

So I am not surprised you can easily run into crashes and other problems. Anyway, please keep reporting so we know what's broken!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants