bugGNUstep - Bugs: bug #9199, nmalloc - allocation function for...

Group
 
 

bug #9199: nmalloc - allocation function for non freeable zones buggy

Submitter:  Mateu Batle <mbatle>
Submitted:  Thu 03 Jun 2004 01:40:10 PM UTC
   
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 03 Jun 2004 02:46:46 PM UTC, comment #1: 

Fixed in CVS ... thanks for the report.

Richard Frith-Macdonald <CaS>
Group Member
Thu 03 Jun 2004 01:40:10 PM UTC, original submission:  

Non freeable zones don't work in GNUstep. Function nmalloc always returns the same pointer call after call. It does not keep track of allocated space. The bug has not much influence, since this kind of zones are not used normally. I have only detected one use of them in StepTalk application, which can be safely changed to freeable zones.

If this is not easy to fix, at least put some code to show some error or throw an exception, so it the usage is easily detectable. Or even better, switch internally to freeable zones until fixed.

A piece of code reproducing the bug:

    NSZone * zone = NSCreateZone(NSPageSize(), NSPageSize(), NO);
    ptr1 = NSZoneMalloc(zone, 16);
    ptr2 = NSZoneMalloc(zone, 16);
    printf("0x%x 0x%x", ptr1, ptr2);

Mateu Batle <mbatle>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 3 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-06-03 CaS StatusNone Fixed
    Open/ClosedOpen Closed
2004-06-03 mbatle Carbon-Copy- Added mateu --DOT-- batle --AT-- tragnarion --DOT-- com

Back to the top

Powered by Savane 3.13-3230.
Corresponding source code