public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Lothar Linhard <lothar@concept.de>
To: <cygwin@cygwin.com>
Subject: 1.1.3: mmap() returns unusable memory segments: segm fault
Date: Mon, 05 Nov 2001 12:08:00 -0000	[thread overview]
Message-ID: <Pine.WNT.4.33.0111052103420.118-101000@erde.concept.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 915 bytes --]

Hi,

I run Cygwin 133 on NT4.0SP6 (output of cygcheck -s
is attached).  mmap() doesn't work even for a very
simple case.  Try:

#include <stdio.h>
#include <sys/mman.h>

int main() {
    char* core;

    core = mmap(NULL,0x10000,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0);
    if (core == MAP_FAILED) goto err;
    printf("mmap %p\n", core);
    *core = 'A';        /* ok */

    core = mmap(NULL,0x20000,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0);
    if (core == MAP_FAILED) goto err;
    printf("mmap %p\n", core);
    *core = 'A';        /* Segmentation fault */

    return 0;

  err:
    perror("mmap");
    return 1;
}
------------------------- end of test program -----------------
Same, if I use MA_SHARED. Any Help?
When I run this, I get:

mmap 0x1a230000
mmap 0x1a240000
      0 [main] a 126 open_stackdumpfile: Dumping stack trace to a.exe.stackdump Segmentation fault (core dumped)

Lothar.

[-- Attachment #2: cygcheck.out --]
[-- Type: text/x-Algol68, Size: 8610 bytes --]


Cygnus Win95/NT Configuration Diagnostics
Current System Time: Mon Nov  5 20:57:45 2001

WinNT Ver 4.0 build 1381 Service Pack 6

Path:	.
	/cygdrive/h/bin
	/usr/local/bin
	/usr/bin
	/bin
	/cygdrive/c/WINNT/system32
	/cygdrive/c/WINNT
	/cygdrive/c/Program Files/Bitkeeper
	/cygdrive/c/tcltk83/bin
	/cygdrive/c/tools
	/cygdrive/c/tcltk82/bin
	/cygdrive/c/tcltk81/bin
	/cygdrive/c/tcltk80/bin
	/cygdrive/c/PROGRA~1/BITKEE~1
	/cygdrive/c/MSDEV/bin
	/cygdrive/c/Program Files/DevStudio/SharedIDE/bin

SysDir: C:\WINNT\System32
WinDir: C:\WINNT

PWD = `/cygdrive/h/gv2/zdb'
MAKEFLAGS = `--no-print-directory'
USER = `lld'
MAKE_MODE = `unix'
HOME = `/cygdrive/h'

NUMBER_OF_PROCESSORS = `1'
PROMPT = `$P$G'
LOGONSERVER = `\\ERDE'
OS2LIBPATH = `C:\WINNT\system32\os2\dll;'
COMSPEC = `C:\WINNT\system32\cmd.exe'
!C: = `C:\cygwin\bin'
SYSTEMDRIVE = `C:'
HOSTNAME = `ERDE'
INCLUDE = `c:\msdev\include;c:\msdev\atl\include;c:\msdev\mfc\include;%include%'
PROCESSOR_REVISION = `0803'
MSDEVDIR = `C:\Program Files\DevStudio\SharedIDE'
PATHEXT = `.COM;.EXE;.BAT;.CMD'
COMPUTERNAME = `ERDE'
WINDIR = `C:\WINNT'
USERPROFILE = `C:\WINNT\Profiles\lld'
PS1 = `\h\$ '
HOMESHARE = `\\star\lld'
UID = `52'
MACHTYPE = `i686-pc-cygwin'
PROCESSOR_IDENTIFIER = `x86 Family 6 Model 8 Stepping 3, GenuineIntel'
LM_LICENSE_FILE = `1700@Jupiter'
OS = `Windows_NT'
OLDPWD = `/cygdrive/h'
PROCESSOR_ARCHITECTURE = `x86'
TEMP = `/cygdrive/c/TEMP'
SIMUCAD_LICENSE_FILE = `C:\Program Files\Simucad\Silos2001Demo\silos.lic'
EDITOR = `vi'
PROCESSOR_LEVEL = `6'
SYSTEMROOT = `C:\WINNT'
HOMEDRIVE = `\\'
LIB = `c:\msdev\lib;c:\msdev\mfc\lib;%lib%'
SHLVL = `1'
SILOS_HOME = `C:\Program Files\Simucad\Silos2001Demo'
HOMEPATH = `star\lld'
USERDOMAIN = `ERDE'
USERNAME = `lld'
SHELL = `/bin/bash'
HOSTTYPE = `i686'
OSTYPE = `cygwin'
TERM = `cygwin'
CFLAGS = `-g'
PURIFYOPTIONS = `-free-queue-length=1000 -chain-length=12'
ceBoxLicence = `BK99B2J7DI8IF7 2FIEL1655GG2AL 2J2IG9CHF1J88G L941NNILJFFELB'
LC_COLLATE = `C'
_ = `/usr/bin/cygcheck'
TZ = `WEST-1WEDT-2,M3.5.0/2,M10.5.0/3'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
  (default) = `/cygdrive'
  cygdrive flags = 0x00000022
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/ce
  (default) = `\\star\ce'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/extra
  (default) = `\\star\extra'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/home
  (default) = `C:\home'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/obj
  (default) = `D:\obj'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/tmp
  (default) = `C:\tmp'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = `C:\cygwin'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = `C:/cygwin/bin'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = `C:/cygwin/lib'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options

a:  fd           N/A    N/A                    
c:  hd  NTFS    4008Mb  40% CP CS UN PA FC     System
d:  hd  NTFS   15610Mb  11% CP CS UN PA FC     
e:  cd           N/A    N/A                    
h:  net NTFS    5321Mb  88% CP CS    PA        lld
s:  net NTFS    3124Mb  61% CP CS    PA        ce
x:  net NTFS   33926Mb  48% CP CS    PA        extra

C:\cygwin\bin  /usr/bin  system  binmode
C:\cygwin\lib  /usr/lib  system  binmode
\\star\extra  /extra   user    binmode
C:\cygwin  /        system  binmode
\\star\ce  /ce      user    binmode
C:\home  /home    user    binmode
C:\tmp  /tmp     user    binmode
D:\obj  /obj     user    binmode
c:    /cygdrive/c  user    binmode,noumount
d:    /cygdrive/d  user    binmode,noumount
h:    /cygdrive/h  user    binmode,noumount
s:    /cygdrive/s  user    binmode,noumount
x:    /cygdrive/x  user    binmode,noumount

Found: C:\cygwin\bin\bash.exe
Found: C:\cygwin\bin\cat.exe
Found: C:\cygwin\bin\cpp.exe
Found: C:\cygwin\bin\find.exe
Found: C:\cygwin\bin\gcc.exe
Found: C:\cygwin\bin\gdb.exe
Found: C:\cygwin\bin\ld.exe
Found: C:\cygwin\bin\ls.exe
Found: C:\cygwin\bin\make.exe
Found: C:\cygwin\bin\sh.exe

   56k 2000/12/03 C:\cygwin\bin\cygbz21.0.dll - os=4.0 img=1.0 sys=4.0
                  "cygbz21.0.dll" v0.0 ts=2000/11/21 0:53
   34k 2001/09/30 C:\cygwin\bin\cygform6.dll - os=4.0 img=1.0 sys=4.0
                  "cygform6.dll" v0.0 ts=2001/9/30 4:43
   18k 2000/10/23 C:\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm.dll" v0.0 ts=2000/10/23 4:26
   17k 2001/06/28 C:\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory4.dll" v0.0 ts=2001/1/7 5:34
   21k 2001/06/28 C:\cygwin\bin\cyghistory5.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory5.dll" v0.0 ts=2001/6/28 4:27
   21k 2001/06/20 C:\cygwin\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl.dll" v0.0 ts=2001/6/20 19:09
   81k 2001/10/20 C:\cygwin\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitcl30.dll" v0.0 ts=2001/10/20 2:25
   35k 2001/10/20 C:\cygwin\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitk30.dll" v0.0 ts=2001/10/20 2:25
   45k 2001/07/04 C:\cygwin\bin\cygjbig1.dll - os=4.0 img=1.0 sys=4.0
                  "cygjbig1.dll" v0.0 ts=2001/7/4 5:25
  119k 2001/06/06 C:\cygwin\bin\cygjpeg6b.dll - os=4.0 img=1.0 sys=4.0
                  "cygjpeg6b.dll" v0.0 ts=2001/6/6 6:27
   19k 2001/09/30 C:\cygwin\bin\cygmenu6.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu6.dll" v0.0 ts=2001/9/30 4:43
  175k 2001/09/30 C:\cygwin\bin\cygncurses++6.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses++6.dll" v0.0 ts=2001/9/30 4:45
  201k 2001/09/30 C:\cygwin\bin\cygncurses6.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses6.dll" v0.0 ts=2001/9/30 4:42
   12k 2001/09/30 C:\cygwin\bin\cygpanel6.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel6.dll" v0.0 ts=2001/9/30 4:43
  163k 2001/05/06 C:\cygwin\bin\cygpng2.dll - os=4.0 img=1.0 sys=4.0
                  "cygpng2.dll" v0.0 ts=2001/5/6 6:05
  108k 2001/06/28 C:\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline4.dll" v0.0 ts=2001/1/7 5:34
  135k 2001/06/28 C:\cygwin\bin\cygreadline5.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline5.dll" v0.0 ts=2001/6/28 4:27
  390k 2001/10/20 C:\cygwin\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtcl80.dll" v0.0 ts=2001/10/20 2:24
    5k 2001/10/20 C:\cygwin\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0
   10k 2001/10/20 C:\cygwin\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtclreg80.dll" v0.0 ts=2001/10/20 2:24
  245k 2001/06/12 C:\cygwin\bin\cygtiff3.dll - os=4.0 img=1.0 sys=4.0
                  "cygtiff3.dll" v0.0 ts=2001/6/12 19:25
  623k 2001/10/20 C:\cygwin\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtk80.dll" v0.0 ts=2001/10/20 2:25
   41k 2001/07/04 C:\cygwin\bin\cygXpm-noX4.dll - os=4.0 img=1.0 sys=4.0
                  "cygXpm-noX4.dll" v0.0 ts=2001/7/4 3:21
   45k 2001/07/04 C:\cygwin\bin\cygXpm-X4.dll - os=4.0 img=1.0 sys=4.0
                  "cygXpm-X4.dll" v0.0 ts=2000/11/20 3:45
   49k 2001/02/03 C:\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
                  "cygz.dll" v0.0 ts=2001/2/3 21:35
  701k 2001/09/13 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=2001/9/13 5:54
    Cygwin DLL version info:
        dll major: 1003
        dll minor: 3
        dll epoch: 19
        dll bad signal mask: 19005
        dll old termios: 5
        dll malloc env: 28
        api major: 0
        api minor: 46
        shared data: 3
        dll identifier: cygwin1
        mount registry: 2
        cygnus registry name: Cygnus Solutions
        cygwin registry name: Cygwin
        program options name: Program Options
        cygwin mount registry name: mounts v2
        cygdrive flags: cygdrive flags
        cygdrive prefix: cygdrive prefix
        cygdrive default prefix: 
        build date: Wed Sep 12 23:54:31 EDT 2001
        shared id: cygwin1S3

Use -h to see help about each section

             reply	other threads:[~2001-11-05 12:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-05 12:08 Lothar Linhard [this message]
2001-11-05 13:01 ` Corinna Vinschen
2001-11-05 13:31   ` Christopher Faylor
2001-11-06  2:16   ` Lothar Linhard
2001-11-06  2:46     ` Corinna Vinschen
2001-11-06  4:20       ` Lothar Linhard
2001-11-06  5:05         ` Corinna Vinschen
2001-12-20 10:57           ` Lothar Linhard
2001-12-20 13:02             ` Corinna Vinschen
2001-12-21 12:59             ` Lothar Linhard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.WNT.4.33.0111052103420.118-101000@erde.concept.de \
    --to=lothar@concept.de \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).