[tor-bugs] #33087 [Core Tor/Tor]: closing stdio fds on exit can interfere with LeakSanitizer, etc

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Feb 12 09:29:29 UTC 2020


#33087: closing stdio fds on exit can interfere with LeakSanitizer, etc
-------------------------------------------------+-------------------------
 Reporter:  catalyst                             |          Owner:  teor
     Type:  defect                               |         Status:
                                                 |  needs_review
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.4.3.x-final
Component:  Core Tor/Tor                         |        Version:  Tor:
                                                 |  0.4.1.6
 Severity:  Normal                               |     Resolution:
 Keywords:  tor-log, 043-should, consider-       |  Actual Points:  0.4
  backport-after-0433, 041-backport,             |
  042-backport                                   |
Parent ID:                                       |         Points:  0.2
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------
Changes (by teor):

 * actualpoints:  0.3 => 0.4


Comment:

 Replying to [comment:10 teor]:
 > fsync() doesn't exist on Windows, so I made the flush functions depend
 on HAVE_UNISTD_H.

 Windows doesn't have `fsync()`, but it does have `unistd.h`. So I just
 deleted the close functions for the backport branches, and cleaned up the
 log fd duplication on master.

 Do you think it's worth checking for `fsync()` at configure time, and
 flushing the files if it exists? I'd only make this change in master.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/33087#comment:11>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list