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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitted by:  Mateu Batle <mbatle>
Submitted on:  Thu 03 Jun 2004 01:40:10 PM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

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

Fixed in CVS ... thanks for the report.

Richard Frith-Macdonald <CaS>
Project 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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 03 Jun 2004 02:46:46 PM UTCCaSStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Thu 03 Jun 2004 01:40:10 PM UTCmbatleCarbon-Copy-=>Added mateu --DOT-- batle --AT-- tragnarion --DOT-- com

Back to the top


Powered by Savane 3.1-cleanup1