Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guard Malloc with CodeWarrior and CFM/PEF applications?



On Oct 21, 2004, at 8:27 PM, Matt Ackeret wrote:

On Thu, 21 Oct 2004, Dave Thorup wrote:
Can you even use Guard Malloc with CFM applications?

You definitely can. I do it all the time (but not with CodeWarrior).

Thanks for the scripts, but I still can't get a CFM app to work with Guard Malloc. I've now tried on both my G5 Dual 2.0 GHz and my PowerBook G4 800 MHz and I get the same output on each. I'm running Mac OS X 10.3.5 (Build 7M34) with Xcode 1.5 installed. Here's what I run through gdb (using the scripts you provided me):


----------------------------------------------
dave% DebugCFM Carbon\ Toolbox\ Debug
GNU gdb 5.3-20030128 (Apple version gdb-330.1) (Fri Jul 16 21:42:28 GMT 2004)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-apple-darwin".
Reading symbols for shared libraries .... done
(gdb) guardmalloc
(gdb) run
Starting program: /System/Library/Frameworks/Carbon.framework/Versions/A/Support/ LaunchCFMApp "Carbon Toolbox Debug"
Allocations will be placed on word (4 byte) boundaries.
- Small buffer overruns may not be noticed.
- Applications using AltiVec instructions may fail.
GuardMalloc-8
Reading symbols for shared libraries .................................................... done
Allocations will be placed on word (4 byte) boundaries.
- Small buffer overruns may not be noticed.
- Applications using AltiVec instructions may fail.
GuardMalloc-8


Program received signal EXC_BAD_ACCESS, Could not access memory.
0xffff8acc in __memcpy ()
(gdb) bt
#0  0xffff8acc in __memcpy ()
#1  0x902b0270 in AllocateAndRememberCfrgRecord ()
#2  0x902c747c in ProcessRegisteredFile ()
#3  0x902c0ff4 in PCFragRegisterFile ()
#4  0x902b6b78 in RegisterOneFile ()
#5  0x902b1274 in RegisterLibraryFiles ()
#6  0x902cf938 in CCFM_InitializeCrutchCFM ()
#7  0x00008804 in main ()
#8  0x00008408 in _start ()
#9  0x0000827c in start ()
----------------------------------------------

The application I'm running it on is built from the CodeWarrior Mac OS X C++ Stationary, Mac OS Carbon->Mac OS Toolbox->C++ Toolbox Carbon template. It really doesn't do anything but show an alert. I've also tried it on other simple applications and I can never get it to work. I always get the same output like above. What might I be doing wrong?

Could there be a bug in LaunchCFMApp on 10.3.5?

Thanks!
_____________________________

Dave Thorup
Mac Software Engineer
email@hidden

Nikon Inc., Imaging Division
www.nikonusa.com

_______________________________________________
Do not post admin requests to the list. They will be ignored.
PerfOptimization-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/perfoptimization-dev/email@hidden

This email sent to email@hidden
References: 
 >Guard Malloc with CodeWarrior and CFM/PEF applications? (From: Dave Thorup <email@hidden>)
 >Re: Guard Malloc with CodeWarrior and CFM/PEF applications? (From: Matt Ackeret <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.