Any ideas?

On Thu, Oct 29, 2009 at 1:33 PM, BAI LI <[email protected]> wrote:

> Hi,
>
> I am currently designing a authentication protocol in sensor networks. I
> have defined the follwoing variables:
>
> //on the sender side:
>
> uint64_t hash=0;
> uint8_t payload[8];
>
> //break the 64 bit hash down into eight 8-bit paylaod for sending purpose
> for(i=0;i<=10;i++){
>    payload[0]=(uint8_t)(st[i].hash>>56);
>    payload[1]=(uint8_t)(st[i].hash>>48);
>    payload[2]=(uint8_t)(st[i].hash>>40);
>    payload[3]=(uint8_t)(st[i].hash>>32);
>    payload[4]=(uint8_t)(st[i].hash>>24);
>    payload[5]=(uint8_t)(st[i].hash>>16);
>    payload[6]=(uint8_t)(st[i].hash>>8);
>    payload[7]=(uint8_t)st[i].hash;
> }
>
> when i compiled the code, there is no error.
> ===================================
> //on the receiver side,
> uint64_t receivedhash=0;
> uint8_t receivedpayload[9];
>
> receivedhash=(uint64_t)msdu[0]<<56
>       +(uint64_t)msdu[1]<<48
>       +(uint64_t)msdu[2]<<40
>       +(uint64_t)msdu[3]<<32
>       +(uint64_t)msdu[4]<<24
>       +(uint64_t)msdu[5]<<16
>       +(uint64_t)msdu[6]<<8
>       +(uint64_t)msdu[7];
>
> when i compiled the code, i got the following error: I have tested the
> different portions of code and make sure the problem comes from the above
> piece.
>
> hashtesting.nc:906: internal error: Segmentation fault
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html <http://gcc.gnu.org/bugs.html>> for
> instructions.
> make: *** [exe0] Error 1
>
> Anyone can help me out? I have tried the whole morning with no luck. Thanks
> in advance.
>
> Regards,
> Bai
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to