Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Undefined behaviour of the C-Python tests caused by lazy initialisation of stackless #126

Closed
ghost opened this issue Apr 12, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 12, 2017

Originally reported by: Anselm Kruis (Bitbucket: akruis, GitHub: akruis)


Problem

Since change e5a2ecca2b08 Stackless initializes the stackless subsystem only if application code loads the module stackless. This causes undefined behaviour in the C-Python test suite, if the execution order of the tests gets randomized. Especially some pickling tests are sensitive, because the initialisation of Stackless enables the pickling of additional types.

I observed failures especially with 3.5-slp, but the problem exists in all 3.x branches.

Proposed Solution

I'll import stackless in the module test.support. Nearly every test-module imports this module very early. While I'm at it, I'll also unify the tests for stackless being available.


@ghost
Copy link
Author

ghost commented Apr 15, 2017

Original comment by Anselm Kruis (Bitbucket: akruis, GitHub: akruis):


Fixed in changesets:

  • 3.3-slp: 3fca818f7f75
  • 3.4-slp: a103f282195d
  • 3.5-slp: 540d64167ee3

Not yet merged into default-slp.

@ghost ghost added this to the 3.3.7-slp milestone Sep 24, 2017
@ghost ghost closed this as completed Sep 24, 2017
akruis pushed a commit that referenced this issue Oct 29, 2017
Load the module "stackless" early in all C-Python tests. This ensures a defined
behaviour of the tests even, if the execution order gets randomised.

https://bitbucket.org/stackless-dev/stackless/issues/126
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

0 participants