[tor-bugs] #20530 [Core Tor/Tor]: undefined reference to 'munmap' and 'mmap' building tor on Windows

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Nov 4 06:07:44 UTC 2016


#20530: undefined reference to 'munmap' and 'mmap' building tor on Windows
-------------------------------------------------+-------------------------
 Reporter:  ice                                  |          Owner:
     Type:  defect                               |         Status:
                                                 |  needs_review
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.2.9.x-final
Component:  Core Tor/Tor                         |        Version:  Tor:
                                                 |  unspecified
 Severity:  Normal                               |     Resolution:
 Keywords:  windows, mingw, backport,            |  Actual Points:  0.3
  029-proposed, CoreTorTeam201611                |
Parent ID:                                       |         Points:  0.3
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by teor):

 Replying to [comment:13 nickm]:
 > teor: fwiw, the patch looks good, but IIUC it doesn't resolve the
 problem above?

 The test.exe error is a different bug to do with asprintf, not mman.
 It's likely that some logging code called by the circuit_timeout and geoip
 tests use a format not understood by _vscprintf or _vsnprintf.
 This is probably happening due to #19999.
 I've split this off into #20560.

 Otherwise, I am unable to tell if it resolves the mman problem above,
 because the build environment changed between:
 https://trac.torproject.org/projects/tor/attachment/ticket/20530
 /configure-output.txt
 and:
 https://trac.torproject.org/projects/tor/attachment/ticket/20530
 /configureOutput-fix-mingw-pagesize.txt
 likely due to:
 https://trac.torproject.org/projects/tor/ticket/20530?replyto=13#comment:7

 The first build had sys/mman.h available, the second did not.

 However, the patch does prevent a call to getpagesize() when sys/mman.h is
 present, but getpagesize is not. So it's a net win.

 > >would you say it is safe to use the tor I built without the mman
 functionality?
 >
 > ice: it should be just fine.  The windows memory mapping code (which Tor
 uses when HAVE_SYS_MMAN_H is not defined) is probably a much better choice
 for Windows users.

 It is, as long as you are not using Cygwin.

 If you are using Cygwin, you need to use Cygwin's mmap() so that Cygwin
 can handle fork() semantics correctly (and possibly other system calls).

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


More information about the tor-bugs mailing list