Noah yan wrote:
mmap failed: Invalid argument
Patching file /usr/src/bin/csh/../../contrib/tcsh/sh.exp.c using Plan B...
Segmentation fault (core dumped)

could you debug this core file?  Seems that there are two problems:

1. mmap fails.  root of the problem.  what could be the invalid argument:

    [EINVAL]           MAP_FIXED was specified and the addr parameter was not
                       page aligned, or part of the desired address space
                       resides out of the valid address space for a user
                       process.

I doubt it is using MAP_FIXED, so no.

    [EINVAL]           Len was negative.

possible.

    [EINVAL]           MAP_ANON was specified and the fd parameter was not
                       -1.

I think it is mapping the source file, so MAP_ANON is probably not used.

    [EINVAL]           MAP_ANON has not been specified and fd did not refer-
                       ence a regular or character special file.

dito.

    [EINVAL]           Offset was not page-aligned.  (See BUGS below.)

Possible, but why wouldn't it map all the file?


2. Something does not check the return value of mmap or whatever and hence 
segfaults.


is this reproducable?  is the filesystem correct?  in which phase does this 
happen (I guess at the build tools phase)?  could you create a patch binary 
without -O and with debug symbols?

cheers
 simon

--
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \

Reply via email to