python / python/cpython

Vendored mimalloc references macOS preprocessor symbols that no longer exist

Aberta
#118,072 6 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

OS-ios OS-mac type-bug
Linguagem predominante
Python
Estrelas
77.2k
Forks
36k
Métricas de merge de PRs
Métricas de PR pendentes

Descrição

Bug report

Bug description:

The CPython sources include a vendored copy of https://github.com/microsoft/mimalloc.

This was added 5 months ago as part of #109914. the commit comment says it is version "v2.12". That doesn't appear to be a mimalloc release, but v2.1.2 does exist, and was the current stable release as of November 2023.

However, that code references TARGET_IOS_IPHONE and TARGET_IOS_SIMULATOR. These symbols were deprecated in iOS 15 (released ~2 years ago). These references have been updated in the dev branch of mimalloc (along with many other changes), but there isn't an updated stable mimalloc release at time of writing.

We have also made a number of other changes to the vendored version (about 18 commits, by my count). It's not clear if these mirror changes that have been made upstream, or if we have effectively forked mimalloc at this point.

The code still appears to work at present, but there's a risk it might not in future when the symbol deprecations are finalised. There may also be other updates and bugfixes in mimalloc that we're not taking advantage of.

This was discovered during an audit of TARGET_OS symbol usage following the report of #117886 and #117891.

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Comece nos fontes de mimalloc vendorizados pelo CPython procurando por TARGET_IOS_IPHONE e TARGET_IOS_SIMULATOR e, em seguida, compare essa cópia com o branch de desenvolvimento do mimalloc e com os aproximadamente 18 commits locais. O trabalho estará concluído quando for documentado se os símbolos deprecated e outras correções relevantes do upstream devem ser incorporados ou se a cópia vendorizada divergiu e se tornou um fork mantido.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
c, macos, python
Domínio
operating-systems
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Precisa de esclarecimento
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.