compiling stops in bootstraps stage

Noah yan noah.yan at gmail.com
Thu Jul 26 07:50:10 PDT 2007


Simon,

i didnot see anything wrong with the mmap calls, i_womp = mmap(NULL,
i_size, PROT_READ, MAP_PRIVATE, ifd, 0);
I attached a binary patch built without -O and with -g. Remeber i have
a messed up kernel/modules and the world (typically libc) and the new
binaries built before the error behave very wired, e.g. cp arg.c
argdfd.c errs out with "file name too long". In my another box that
has clean installation and latest sources, things go without any
problem.
Yonghong

On 7/26/07, Simon 'corecode' Schubert <corecode at fs.ei.tum.de> wrote:
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   / \
Attachment:
patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bin00000.bin
Type: application/octet-stream
Size: 83552 bytes
Desc: "Description: Binary data"
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20070726/4446299e/attachment-0019.bin>


More information about the Users mailing list