<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15618</bug_id>
          
          <creation_ts>2024-10-11 13:21:18 +0000</creation_ts>
          <short_desc>qemuarmv5: mrc considered an illegal instruction (as used by python 3.13)</short_desc>
          <delta_ts>2024-10-17 14:34:12 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BSPs</product>
          <component>bsps-oe-core</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>ReportedUpstream</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.2 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexander Kanavin">alex.kanavin</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>diego.russo</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>99842</commentid>
    <comment_count>0</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2024-10-11 13:21:18 +0000</bug_when>
    <thetext>Python 3.13 introduced usage of mrc instructions via inline assembly:

https://github.com/python/cpython/blob/main/Include/object.h#L195
https://github.com/python/cpython/blob/main/Include/internal/mimalloc/mimalloc/prim.h#L172
https://github.com/python/cpython/blob/main/Include/internal/mimalloc/mimalloc/prim.h#L199

This seems to work ok in qemuarm (I didn&apos;t specifically confirm that these code paths are executed though), but in qemuarmv5 it throws &apos;Illegal instruction&apos;.

It isn&apos;t clear if qemu makes incorrect decisions, or the instruction as specified by python is indeed not universal on arm hardware.

For now, I was able to disable the use of it via disabling mimalloc feature on armv5 targets.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99855</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-10-14 10:53:13 +0000</bug_when>
    <thetext>Filed upstream at https://github.com/python/cpython/issues/125444.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99904</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-10-17 14:34:12 +0000</bug_when>
    <thetext>Upstream has now resolved this issue in the 3.13.x branch and we don&apos;t have 3.13.0 yet. Closing as filed upstream, we&apos;ll backport the fix for the upgrade.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>