可能由_wordcopy_fwd_dest_aligned 引起的一处内存出错
来源:互联网 发布:广东windows 98 编辑:程序博客网 时间:2024/05/31 13:14
==28356== Thread 9:1481 ==28356== Invalid read of size 81482 ==28356== at 0x3328A7BA95: _wordcopy_fwd_dest_aligned (in /lib64/libc-2.5.so)1483 ==28356== by 0x3328A7B0FF: bcopy (in /lib64/libc-2.5.so)1484 ==28356== by 0x5E3C45: unsigned int CSocket::packetPackZip<ByteBuffer<unsigned char [65560]> >(void const*, unsigned int, ByteBuffer<unsigned char [65560]>&, bool)
这是通过memcheck检查到的一个内存读错误,
发现可能是因为 _wordcopy_fwd_dest_aligned 偏移对齐的操作引起的
http://www.oschina.net/code/explore/glibc-2.9/sysdeps/powerpc/powerpc32/power4/wordcopy.c
/** _wordcopy_fwd_dest_aligned -- Copy block beginning at SRCP to
064
block beginning at DSTP with LEN `op_t' words (not LEN bytes!).
065
DSTP should be aligned for memory operations on `op_t's, but SRCP must
066
*not* be aligned. */
067
068
void
069
_wordcopy_fwd_dest_aligned (dstp, srcp, len)
070
long
int
dstp;
071
long
int
srcp;
072
size_t
len;
073
{
074
op_t a0, a1, a2;
075
int
sh_1, sh_2;
076
077
/** Calculate how to shift a word read at the memory operation
078
aligned srcp to make it aligned for copy. */
079
080
sh_1 = 8 * (srcp % OPSIZ);
081
sh_2 = 8 * OPSIZ - sh_1;
082
083
/** Make SRCP aligned by rounding it down to the beginning of the `op_t'
084
it points in the middle of. */
085
srcp &= -OPSIZ;
086
a0 = ((op_t *) srcp)[0];
087
088
if
(len & 1)
089
{
090
a1 = ((op_t *) srcp)[1];
091
((op_t *) dstp)[0] = MERGE (a0, sh_1, a1, sh_2);
092
093
if
(len == 1)
094
return
;
095
096
a0 = a1;
097
srcp += OPSIZ;
098
dstp += OPSIZ;
099
len -= 1;
100
}
101
102
do
103
{
104
a1 = ((op_t *) srcp)[1];
105
a2 = ((op_t *) srcp)[2];
106
((op_t *) dstp)[0] = MERGE (a0, sh_1, a1, sh_2);
107
((op_t *) dstp)[1] = MERGE (a1, sh_1, a2, sh_2);
108
a0 = a2;
109
110
srcp += 2 * OPSIZ;
111
dstp += 2 * OPSIZ;
112
len -= 2;
113
}
114
while
(len != 0);
115
}
- 可能由_wordcopy_fwd_dest_aligned 引起的一处内存出错
- 那些由NSTimer 和performSelector 可能引起的内存泄漏
- 内存泄露的可能引起原因
- ObjectOutputStream 可能引起的内存泄漏
- ThreadLocal可能引起的内存泄露
- ThreadLocal可能引起的内存泄露
- ThreadLocal可能引起的内存泄露
- ThreadLocal可能引起的内存泄露
- 【并发】ThreadLocal可能引起的内存泄露
- ThreadLocal可能引起的内存泄露
- 由dispatch_async引起的内存泄露
- 解决由Handler 引起的内存泄漏
- 由SQL Server的job出错调查引起的思考
- 闭包的作用与可能引起的内存泄漏
- Android 中Handler可能引起的内存泄露
- Android必知必会-Handler可能引起的内存泄露
- Handler可能引起的内存泄露及解决方案-android
- 检测由new/delete使用不当引起的内存泄露
- 嘟嘟连忙上前非常有礼貌的说
- 算法导论16.3_Huffman编码+优先队列(堆实现)
- 作文这家伙其实也没什么怕
- 探索Asp.net mvc 的文件上传(由浅入深)
- Linux设备管理之权限倾斜——mem、proc、devfs、sysfs、udev
- 可能由_wordcopy_fwd_dest_aligned 引起的一处内存出错
- 计算所用时间和频率
- JAVA并发编程学习笔记之CLH队列锁
- Android项目编码的批量修改(GBK转UTF-8)
- el 表达式不起作用
- 严重: Skipped installing application listeners due to previous error(s)
- 黑马程序员-学习笔记java基础-基本语法
- JDBC通过集成身份验证进行连接 sqlserver
- 中断及共享中断概述