KEMBAR78
gh-120688: Build WASI with -O3 in debug mode by vstinner · Pull Request #120691 · python/cpython · GitHub
Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Jun 18, 2024

On WASI in debug mode, Python is now built with compiler flag -O3 instead of -Og, to support more recursive calls.

On WASI in debug mode, Python is now built with compiler flag -O3
instead of -Og, to support more recursive calls.
@vstinner
Copy link
Member Author

!buildbot wasm32-wasi

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @vstinner for commit 8601b00 🤖

The command will test the builders whose names match following regular expression: wasm32-wasi

The builders matched are:

  • wasm32-wasi PR
  • wasm32-wasi Non-Debug PR

@vstinner
Copy link
Member Author

vstinner commented Jun 18, 2024

cc @brettcannon @ericsnowcurrently

All my attempts to increase the WASI memory went nowhere. On the current main branch with a debug build, the following program fails when run with more than 35 recursive calls :-(

import sys

def call_method(depth):
    class X:
        def __call__(self, n):
            if n: return self(n-1)
    X()(depth)

sys.setrecursionlimit(10_000)
n = 35
call_method(n)
print(f"recursive: max {n} calls")

With this change, Python is always built with -O3, in release an debug mode, and the recursion limit is closer to 150 in debug mode which is enough to fix test_email.

As you can see, the test suite pass again on "buildbot/wasm32-wasi PR" (whereas it's failing without this change).

@vstinner vstinner merged commit 49f51de into python:main Jun 18, 2024
@vstinner vstinner deleted the wasi_o3 branch June 18, 2024 17:35
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot iOS ARM64 Simulator 3.x has failed when building commit 49f51de.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/1380/builds/626) and take a look at the build logs.
  4. Check if the failure is related to this commit (49f51de) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/1380/builds/626

Failed tests:

  • test_support

Failed subtests:

  • test_fd_count - test.test_support.TestSupport.test_fd_count

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/Users/buildbot/Library/Developer/XCTestDevices/91448BBD-F27E-4D85-9201-DA3F21107FD3/data/Containers/Bundle/Application/E4BCC392-B226-43B9-9365-10D58392DB39/iOSTestbed.app/python/lib/python3.14/test/test_support.py", line 564, in test_fd_count
    self.assertEqual(more - start, 1)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
AssertionError: 0 != 1

@brettcannon
Copy link
Member

Thanks, Victor!

mrahtz pushed a commit to mrahtz/cpython that referenced this pull request Jun 30, 2024
On WASI in debug mode, Python is now built with compiler flag -O3
instead of -Og, to support more recursive calls.
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
On WASI in debug mode, Python is now built with compiler flag -O3
instead of -Og, to support more recursive calls.
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
On WASI in debug mode, Python is now built with compiler flag -O3
instead of -Og, to support more recursive calls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants