#3772: missaligned pointer dereference in cpukit/libnetworking/libc/res_query.c:131 ---------------------------------------+--------------------- Reporter: Jeffrey Hill | Owner: (none) Type: defect | Status: new Priority: normal | Milestone: Component: network/legacy | Version: 4.11 Severity: normal | Resolution: Keywords: missaligned libnetworking | Blocked By: Blocking: | ---------------------------------------+---------------------
Comment (by Gedare Bloom): Probably the 'buf' should be aligned to the structure alignment since it gets cast to HEADER struct. You can at least use CPU_STRUCTURE_ALIGNMENT macro, or else create a union, something like this might work {{{ union { struct { HEADER header; u_char payload[RTEMS_ZERO_LENGTH_ARRAY]; }; u_char buffer[MAXPACKET]; } x; u_char *buf = x.buffer; }}} -- Ticket URL: <http://devel.rtems.org/ticket/3772#comment:7> RTEMS Project <http://www.rtems.org/> RTEMS Project
_______________________________________________ bugs mailing list bugs@rtems.org http://lists.rtems.org/mailman/listinfo/bugs