File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed 
Sources/Testing/SourceAttribution Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -85,9 +85,17 @@ public struct Backtrace: Sendable {
8585#endif 
8686
8787      let  endIndex  =  addresses. index ( addresses. startIndex,  offsetBy:  initializedCount) 
88-       return  addresses [ ..< endIndex] . withMemoryRebound ( to:  UnsafeRawPointer ? . self)  {  addresses in 
88+ #if _pointerBitWidth(_64) 
89+       // The width of a pointer equals the width of an `Address`, so we can just
90+       // bitcast the memory rather than mapping through UInt first.
91+       return  addresses [ ..< endIndex] . withMemoryRebound ( to:  Address . self)  {  addresses in 
8992        Self ( addresses:  addresses) 
9093      } 
94+ #else 
95+       return  addresses [ ..< endIndex] . withMemoryRebound ( to:  UnsafeRawPointer ? . self)  {  addresses in 
96+         return  Self ( addresses:  addresses) 
97+       } 
98+ #endif 
9199    } 
92100  } 
93101} 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments