[Pkg-jed-commit] [SCM] Debian packaging of JED branch, upstream-fixes, created. 222c5d0c856c5cf1eb218493eddbf33d6e43fd5c
Jörg Sommer
joerg at alea.gnuu.de
Sun Aug 24 17:07:19 UTC 2008
The branch, upstream-fixes has been created
at 222c5d0c856c5cf1eb218493eddbf33d6e43fd5c (commit)
- Shortlog ------------------------------------------------------------
commit 222c5d0c856c5cf1eb218493eddbf33d6e43fd5c
Author: Jörg Sommer <joerg at alea.gnuu.de>
Date: Sun Aug 24 18:34:57 2008 +0200
Use intermediate void* pointer for SLmalloc() return values
The cast from char* to any other pointer type might increases required
alignment of target type. This causes problems on some architectures
(like alpha).
Fix it by saving the result of SLmalloc() and SLrealloc() to a void*
pointer and then copy it to the target variable.
commit 8e7aaf0299e0d1a3063454b568b9c918548d6474
Author: Jörg Sommer <joerg at alea.gnuu.de>
Date: Sun Aug 24 17:41:40 2008 +0200
Make return type of jed_malloc0() void*
The cast from char* to any other pointer type might increases required
alignment of target type. On some architectures (like alpha) this
triggers an error message at runtime, if the access of a pointer is
unaligned:
% cat cast-test.c
int main(void)
{
char buf[10] = { 0 };
int *a = (int*)&buf[1];
*a = 0x7a7a7a;
return 0;
}
% gcc -Wall -Wcast-align cast-test.c -o cast-test
cast-test.c: In function `main':
cast-test.c:4: warning: cast increases required alignment of target type
% ./cast-test
Unaligned access pid=398552 <cast-test> va=0x11fffbfe1 pc=0x12000112c ra=0x1200010ac inst=0xb0220000
commit ee19e705785bcea2fa07e09b029e797152ecdf20
Author: Jörg Sommer <joerg at alea.gnuu.de>
Date: Sun Aug 24 11:48:33 2008 +0200
Remove duplicate brace
-----------------------------------------------------------------------
--
Debian packaging of JED
More information about the Pkg-jed-commit
mailing list