Opened 4 years ago
Last modified 4 years ago
#1341 new defect
collect-heap-utilization-by-class causes heap corruption
Reported by: | svspire | Owned by: | gb |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | IDE | Version: | trunk |
Keywords: | Cc: |
Description
(ccl::heap-utilization :gc-first nil :classes t)
causes heap corruption, at least in the CCL IDE.
Test:
Do the above form in the OSX IDE, then meta-dot on some form that has a definition. You'll either get a cryptic Cocoa error: "Objective-C runtime exception: typeForContentsOfURL:error: must be overridden for your application to support non-'file:' URLs."
Or you get a "Definitions" window that's about 1 inch square and cannot be expanded.
Or you get an error in the AltConsole?:
Error: The value #<A Null Foreign Pointer> is not of the expected type FIXNUM. While executing: CCL::ID-MAP-FREE-OBJECT, in process Initial(0). Type :POP to abort, :R for a list of available restarts. Type :? for other options.
Sometimes you might have to execute the form more than once to see an error. This is not a new bug; it happens with 1.12-dev-r16695M-trunk and much older versions of CCL/IDE in both 32-bit and 64-bit mode.
EGC enabled or not makes no difference.
(ccl::heap-utilization :gc-first nil :classes nil) causes no such corruption.
I've narrowed this down enough to know that the hash table operations in #'collect-heap-utilization-by-class are probably not the culprit. But commenting out the call to #'class-of (and assigning the "class" local variable to e.g. #.(find-class 'input-stream)) does solve the problem.