site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=+oGdHXCg4yMro7yQVdCGbgqxbSWZQ2DOrZ9L2jflzJs=; b=qtvnFkc3FQs3SbK3ek3ivvpxDU7/csQBfMApVx20A02YoHQQzJsuACq81grEpXxOld zBBKEz8cKSsCaMQhttSomwHr7mdU/QBxvqPPqGeMU0Q/mMNQaAo0GCjf3T0S+/Ujz6ug +h/faUBoDWdr8csFMkEI6G0penHUjWT7C2xfE= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=fJwOyTFCtQnaKuKP8YjzzwR0B7nvYI1TQyGimuxsbUZM+RKY4HJEZ4cM5VkoCRqk22 fwIDkp0vYNjEaY1j3KUhb1ZwlxzHJBoXPKLhlk81ZuGtx5axTr6NH5YrFIrdstXwlX1N A30QUgX4WBvg9ggal6CW1PygSw2V0PGOpE32I= Hi, I hope this is the right list for my problem. I have the following problem (let's call this my testcase for the problem I'm seeing in my application): bash-3.2$ cat test.c #include <stdlib.h> int main(){ void *ptr = NULL; if (posix_memalign(&ptr, 16, 0)) return; if (ptr) free(ptr); if (posix_memalign(&ptr, 32, 0)) return; if (ptr) free(ptr); } bash-3.2$ gdb ./test [..] (gdb) r Starting program: /private/tmp/test Reading symbols for shared libraries +. done test(72919) malloc: *** error for object 0x1001000a0: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Program received signal SIGABRT, Aborted. 0x00007fff88679616 in __kill () (gdb) bt #0 0x00007fff88679616 in __kill () #1 0x00007fff88719cca in abort () #2 0x00007fff886316f5 in free () #3 0x0000000100000f17 in main () at test.c:7 It seems that posix_memalign() with alignment=16 accepts size=0 fine, but with alignment=32, it does not. This works fine (as far as I can see) on other systems that I have access to (Linux on PPC/x86/Arm, Windows). System is MacOSX 10.6.7, on a recent Macbook Pro. Is this a bug, and if so, is it a known bug? Ronald _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com