[MacPorts] #60702: darwintrace's setup is not safe in the presence of other initializers

MacPorts noreply at macports.org
Sun Jun 28 16:33:17 UTC 2020


#60702: darwintrace's setup is not safe in the presence of other initializers
------------------------+-----------------------
  Reporter:  saagarjha  |      Owner:  saagarjha
      Type:  defect     |     Status:  closed
  Priority:  Normal     |  Milestone:
 Component:  base       |    Version:
Resolution:  fixed      |   Keywords:  tracemode
      Port:             |
------------------------+-----------------------
Changes (by saagarjha):

 * status:  new => closed
 * owner:  (none) => saagarjha
 * resolution:   => fixed


Comment:

 In [changeset:"d96e5a85afd0ce3cdd9d8e56409ba89bafd9cccc/macports-base"
 d96e5a85afd0ce3cdd9d8e56409ba89bafd9cccc/macports-base] (master):
 {{{
 #!ConfigurableCommitTicketReference repository="macports-base"
 revision="d96e5a85afd0ce3cdd9d8e56409ba89bafd9cccc"
 Do not interpose functions before initialization

 Static initializers have no defined order in which they are run;
 interposed functions, however, take effect at program initialization. In
 some cases, our interposed functions would be called by libSystem's
 constructors and prior to *our* constructors, and this would lead to
 crashes in trace mode as we would be in an uninitialized state. All our
 interposers now immediately delegate to their interposees until the are
 sure initialization has been performed.

 Closes: https://trac.macports.org/ticket/60702
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/60702#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list