python / python/cpython

Vendored mimalloc references macOS preprocessor symbols that no longer exist

Aperta
#118,072 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

OS-ios OS-mac type-bug
Lingua principale
Python
Stelle
77.2k
Fork
36k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia nei sorgenti di mimalloc vendorizzati da CPython cercando TARGET_IOS_IPHONE e TARGET_IOS_SIMULATOR, quindi confronta quella copia con il ramo di sviluppo di mimalloc e con gli circa 18 commit locali. Il lavoro è concluso quando viene documentato se i simboli deprecated e le altre correzioni rilevanti dell’upstream debbano essere incorporate, oppure se la copia vendorizzata sia divergita fino a diventare un fork mantenuto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
c, macos, python
Ambito
operating-systems
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.