Closed Bug 34040 Opened 25 years ago Closed 25 years ago

HP-UX compiler doesn't like delete[] void *

Categories

(Core :: Layout, defect, P3)

HP
HP-UX
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: cls, Assigned: eric)

References

()

Details

Attachments

(1 file)

The HPUX tinderbox build is failing because of an attempt to deallocate memory from a void* using delete[]. http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey-Ports/954486840.22905.gz jst suggested that we use the nsAllocator class instead of doing an explicit new & delete. Looking at the code, I'm not sure if the overhead of an extra class would be beneficial. However, using the same routines as nsAllocator (ie PR_Malloc & PR_Free) probably wouldn't be a bad idea.
Question, how is mBlock declared? (sorry I am remote and can't see the source). I am assuming it is "void * mBlock" but it is being initialized with a (char *). Chris's diff will work fine (note: you could always do a "delete (char *)mBlock;" since we know that it was created with a (char *) cast, but I like Chris's better)
Blocks: 18687
Yes this is good. The tree should be opening later today can you check this patch in when it opens? If not let me know and I'll make the fix. Thanks for the quick fix. :)
Status: NEW → ASSIGNED
Yes, I can check it in when the tree opens.
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
marking this verified... build no longer stops here
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: