Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: "NON-ALIGNED POINTER BEING FREED"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "NON-ALIGNED POINTER BEING FREED"



9 jul 2008 kl. 22.00 skrev email@hidden:

Hi, UP list:

I am compiling a Linux numerical model (SMOKE emissions processor) on Mac
OS X 10.5.3 (Leopard) with 64-bit memory. The "smkinven" executable runs
well for most source inventories, but when I read in mobile sources, I get
the following errors:


“Successful OPEN for inventory file...forrtl: severe (174): SIGSEGV,
segmentation fault occurred, smkinven(15503) malloc: *** error for object
0x100400210: Non-aligned pointer being freed (2), set a breakpoint in
malloc_error_break to debug, smkinven(15503)....”


I have already increased stack size by compiling using the flag
“-Wl,-stack_addr,0xF10000000 -Wl,-stack_size,0x64000000”. Reading in the
inventory is the step with the largest Data Activity according to the
activity monitor.


What do I look at to fix "non-aligned pointer being freed"? There are
plenty of Google hits on this error message but nothing helpful. Any
suggestions would be appreciated. Thanks!

Most likely, it means you freed something you never malloced, that is, an uninitialized variable. And, more helpfully, it's probably located either on the stack or in a malloced struct.


I suggest you do as it tells you, run the program in gdb and set a break at malloc_error_break. That should let you figure out what variable is being freed.

HTH,
--
Pelle Johansson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Unix-porting mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >"NON-ALIGNED POINTER BEING FREED" (From: email@hidden)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.