[torquedev] OS X outstanding issues
Glen Beane
glen.beane at gmail.com
Mon Jan 12 05:59:08 MST 2009
On Mon, Jan 12, 2009 at 7:50 AM, Glen Beane <glen.beane at gmail.com> wrote:
> On Sun, Jan 11, 2009 at 10:58 PM, Garrick <garrick at usc.edu> wrote:
>> For wordexp, could the problem be tested on configure? Can you make a small
>> C program that can fail?
>
> What do you mean by fail? I can make a very short C program that
> exhibits the problem. It shouldn't print anything, but on Leopard you
> get all kinds of error messages to stderr (see below).
>
> #include <wordexp.h>
>
> int main (int *argc, char **argv)
> {
> wordexp_t strexp;
> char str[] = "/~";
>
> wordexp(str, &strexp, WRDE_UNDEF);
> wordfree(&strexp);
>
> return 0;
> }
>
>
> there should be no output of this program, but instead you get
> something like this:
>
>
> a.out(342) malloc: *** error for object 0xf: Non-aligned pointer being freed
> *** set a breakpoint in malloc_error_break to debug
> a.out(342) malloc: *** error for object 0x20000: pointer being freed
> was not allocated
...
and here is a backtrace
Breakpoint 1, 0x930a84a9 in malloc_error_break ()
(gdb) where
#0 0x930a84a9 in malloc_error_break ()
#1 0x930a3497 in szone_error ()
#2 0x92fcd463 in szone_free ()
#3 0x92fcd2cd in free ()
#4 0x9305ca0f in wordfree ()
#5 0x00001ff0 in main (argc=0x1, argv=0xbffff834) at blah.c:9
More information about the torquedev
mailing list