Page Fault

Frank Mehnert fm3 at os.inf.tu-dresden.de
Wed Mar 16 12:52:34 CET 2005


On Wednesday 16 March 2005 12:34, Tiago Jorge wrote:
> like you suggested i've disassembled the program, the output in the
> error zone is this:
>
> /home/tiago/l4/pkg/failuredetector/server/src/FailureDetector.cc:30
>  01d00244        add    $0xc,%esp
>  01d00247        push   $0x0
>  01d00249        push   $0x2
>  01d0024b        push   $0x2
>  01d0024d        call   0x1d01300 <socket>
>  01d00252        add    $0x10,%esp
>  01d00255        test   %eax,%eax
>  01d00257        mov    %eax,(%ebx) <--- ERROR HERE!!!!!!
>  01d00259        js     0x1d00344
> /home/tiago/l4/pkg/failuredetector/server/src/FailureDetector.cc:38

That means that the return value of the socket() call is stored somewhere
(in sock_fd). What ist sock_fd -- an object variable, a local variable or
a global variable? If it is an global variable, I assume the the object
was not constructed. Perhaps, sock_fd is part of a static object?

> the code is this one (i'll show the sequence of execution):
>
> the program starts and invokes a function that starts an l4 thread using
> the short version.
> the error lines are in the first function called by the thread (lines 30
> to 38):
>
> int flags=0;
>
>   printf("TOU ANTES DO SOCKET!!!!!!!\n");
>   /* Create socket from which to send */
>   if ((sock_fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
>       perror("open error on socket");
>       exit(1);
>       printf("ERRROOOOOOOOO!!!!!!!\n");
>   }
>
> i've thought it was from perror and i've comment this block, but it gave
> the same error in the next lines.
>
> must i reallocate the internal program thread? if so, how can i do it?

Please post a little bit more, at least the definition of sock_fd or even
the whole file.

Frank
-- 
## Dept. of Computer Science, Dresden University of Technology, Germany ##
## http://os.inf.tu-dresden.de/~fm3                                     ##
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20050316/9442535c/attachment-0001.sig>


More information about the l4-hackers mailing list