summaryrefslogtreecommitdiff
path: root/src/z_native.c
AgeCommit message (Collapse)Author
2014-10-16Fix crash caused by adding a new WAD file.Simon Howard
This fixes #442, a crash caused by adding a new WAD file after a lump has been loaded (and cached) from a previous WAD. This manifested when playing using the Freedoom IWADs and also loading a PWAD at the same time. The Freedoom IWADs have DEHACKED lumps that are loaded from within the IWAD file. The ultimate cause (thanks to Fabian Greffrath for uncovering it) is that lumpinfo is realloc()ed after each new WAD load to store the lumpinfo_t structures from the new WAD. If a lump has been read and cached from a previous WAD file, it may end up having an invalid 'user' pointer that points to somewhere in the old lumpinfo[] array, not the new one. I think this bug was masked because realloc() will often not move data if the previous location can simply be extended. The bug was discovered when loading BTSX as a PWAD, probably because it's a large WAD that contains a lot of lumps, and forced a move during realloc.
2014-05-05Clean up file headers.Simon Howard
This change rewrites and simplifies the copyright headers at the top of all source files: * Remove "Emacs style mode select" line; this line was included in the headers for the originally released source files and appears to be to set the file type for old versions of Emacs. I'm not sure entirely why it was required but I don't think it is any more. * Remove "You should have received a copy of..." text from copyright header. This refers to the old 59 Temple Place address where the FSF headquarters used to be located and is no longer correct. Rather than change to the new address, just remove the paragraph as it is superfluous anyway. This fixes #311. * Remove ---- separator lines so that the file headers are barer and more simplified.
2009-07-13Merge from trunk.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 1626
2009-07-12Fix compile with libsamplerate.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1620
2008-09-06Remove includes of doomdef.h where possible, move generic parts into topSimon Howard
level. Subversion-branch: /branches/raven-branch Subversion-revision: 1204
2007-07-30Make the z_native "out of memory" error message match the normal z_zoneSimon Howard
one. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 941
2007-07-30Fix bug in z_native linked list logic. Clear out all PU_CACHE blocksSimon Howard
when out of memory. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 940
2006-10-18Strip out CVS logs, RCS Id tags.Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 704
2006-09-12Fix Z_FreeTags in z_native.c (chains were not set to NULL when freed).Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 605
2006-03-25Improve Z_CheckHeap()Simon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 443
2006-03-24Add "native allocator" message to distinguish from z_zone.cSimon Howard
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 439
2006-03-24Add a second implementation of the zone memory system which just uses Simon Howard
malloc() and free() as a backend. This will be useful for running dedicated servers (no need to allocate an entire heap). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 435