This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: the POSIX test build


I added the int "dummy" field to cyg_mtab_entry in
io/fileio/current/include/fileio.h. But it yet does not
work ("segmentation fault") :-(
I used already the elix template here.

--
Boris Guzhov,
St.Petersburg, Russia

> > I tried  my posix test  for the linux syntetic platform.
> > (gdb) run
> > Starting program: /home/ecostest/work/posix_tests/./pthread1
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x26e in matchlen (s1=0x5b04 "/",
> >     s2=0x4003cc68 <Address 0x4003cc68 out of bounds>)
> >     at /usr/local/src/ecos/packages/io/fileio/current/src/misc.cxx:192
> > 192         while( s1[len] == s2[len] && s1[len] && s2[len] ) len++;
> > Current language:  auto; currently c++
> > (gdb)
> > ----
> >
> > That is the error occurs before the main() call.
>
> When I try it, I don't even get as far as that. But I know what the
problem
> is, almost certainly in both cases. sizeof(cyg_mtab_entry) is 28, but the
> compiler aligns each one internally to 32 bytes. This causes the table
> walking to go wrong and the values to be corrupted. As a temporary
measure,
> add an extra int field to cyg_mtab_entry in
> io/fileio/current/include/fileio.h. I'll try and find a more permanent
> solution though.
>
> > And there is one more  question:
> > are supported the standart "C" stdio functions (like printf()) in
> > the posix configuration? When I include the printf() call in my test,
> > I have the ld error: "undefined reference to 'printf' "
>
> The posix template is a bare posix kernel only. Try the "elix" template.
>
> Jifl
> --
> Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223)
728762
> "Plan to be spontaneous tomorrow."  ||  These opinions are all my own
fault
>



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]