README.changes 123 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279
  1. This is a rough history of garbage collector bugs and versions.
  2. This has been maintained with varying diligence over the years.
  3. I made an attempt to include recent contributors here. I apologize for any
  4. omissions.
  5. -------------------------
  6. Version 1.3 and immediately preceding versions contained spurious
  7. assembly language assignments to TMP_SP. Only the assignment in the PC/RT
  8. code is necessary. On other machines, with certain compiler options,
  9. the assignments can lead to an unsaved register being overwritten.
  10. Known to cause problems under SunOS 3.5 WITHOUT the -O option. (With
  11. -O the compiler recognizes it as dead code. It probably shouldn't,
  12. but that's another story.)
  13. Version 1.4 and earlier versions used compile time determined values
  14. for the stack base. This no longer works on Sun 3s, since Sun 3/80s use
  15. a different stack base. We now use a straightforward heuristic on all
  16. machines on which it is known to work (incl. Sun 3s) and compile-time
  17. determined values for the rest. There should really be library calls
  18. to determine such values.
  19. Version 1.5 and earlier did not ensure 8 byte alignment for objects
  20. allocated on a sparc based machine.
  21. Version 1.8 added ULTRIX support in gc_private.h.
  22. Version 1.9 fixed a major bug in gc_realloc.
  23. Version 2.0 introduced a consistent naming convention for collector
  24. routines and added support for registering dynamic library data segments
  25. in the standard mark_roots.c. Most of the data structures were revamped.
  26. The treatment of interior pointers was completely changed. Finalization
  27. was added. Support for locking was added. Object kinds were added.
  28. We added a black listing facility to avoid allocating at addresses known
  29. to occur as integers somewhere in the address space. Much of this
  30. was accomplished by adapting ideas and code from the PCR collector.
  31. The test program was changed and expanded.
  32. Version 2.1 was the first stable version since 1.9, and added support
  33. for PPCR.
  34. Version 2.2 added debugging allocation, and fixed various bugs. Among them:
  35. - GC_realloc could fail to extend the size of the object for certain large object sizes.
  36. - A blatant subscript range error in GC_printf, which unfortunately
  37. wasn't exercised on machines with sufficient stack alignment constraints.
  38. - GC_register_displacement did the wrong thing if it was called after
  39. any allocation had taken place.
  40. - The leak finding code would eventually break after 2048 byte
  41. byte objects leaked.
  42. - interface.c didn't compile.
  43. - The heap size remained much too small for large stacks.
  44. - The stack clearing code behaved badly for large stacks, and perhaps
  45. on HP/PA machines.
  46. Version 2.3 added ALL_INTERIOR_POINTERS and fixed the following bugs:
  47. - Missing declaration of etext in the A/UX version.
  48. - Some PCR root-finding problems.
  49. - Blacklisting was not 100% effective, because the plausible future
  50. heap bounds were being miscalculated.
  51. - GC_realloc didn't handle out-of-memory correctly.
  52. - GC_base could return a nonzero value for addresses inside free blocks.
  53. - test.c wasn't really thread safe, and could erroneously report failure
  54. in a multithreaded environment. (The locking primitives need to be
  55. replaced for other threads packages.)
  56. - GC_CONS was thoroughly broken.
  57. - On a SPARC with dynamic linking, signals stayed diabled while the
  58. client code was running.
  59. (Thanks to Manuel Serrano at INRIA for reporting the last two.)
  60. Version 2.4 added GC_free_space_divisor as a tuning knob, added
  61. support for OS/2 and linux, and fixed the following bugs:
  62. - On machines with unaligned pointers (e.g. Sun 3), every 128th word could
  63. fail to be considered for marking.
  64. - Dynamic_load.c erroneously added 4 bytes to the length of the data and
  65. bss sections of the dynamic library. This could result in a bad memory
  66. reference if the actual length was a multiple of a page. (Observed on
  67. Sun 3. Can probably also happen on a Sun 4.)
  68. (Thanks to Robert Brazile for pointing out that the Sun 3 version
  69. was broken. Dynamic library handling is still broken on Sun 3s
  70. under 4.1.1U1, but apparently not 4.1.1. If you have such a machine,
  71. use -Bstatic.)
  72. Version 2.5 fixed the following bugs:
  73. - Removed an explicit call to exit(1)
  74. - Fixed calls to GC_printf and GC_err_printf, so the correct number of
  75. arguments are always supplied. The OS/2 C compiler gets confused if
  76. the number of actuals and the number of formals differ. (ANSI C
  77. doesn't require this to work. The ANSI sanctioned way of doing things
  78. causes too many compatibility problems.)
  79. Version 3.0 added generational/incremental collection and stubborn
  80. objects.
  81. Version 3.1 added the following features:
  82. - A workaround for a SunOS 4.X SPARC C compiler
  83. misfeature that caused problems when the collector was turned into
  84. a dynamic library.
  85. - A fix for a bug in GC_base that could result in a memory fault.
  86. - A fix for a performance bug (and several other misfeatures) pointed
  87. out by Dave Detlefs and Al Dosser.
  88. - Use of dirty bit information for static data under Solaris 2.X.
  89. - DEC Alpha/OSF1 support (thanks to Al Dosser).
  90. - Incremental collection on more platforms.
  91. - A more refined heap expansion policy. Less space usage by default.
  92. - Various minor enhancements to reduce space usage, and to reduce
  93. the amount of memory scanned by the collector.
  94. - Uncollectable allocation without per object overhead.
  95. - More conscientious handling of out-of-memory conditions.
  96. - Fixed a bug in debugging stubborn allocation.
  97. - Fixed a bug that resulted in occasional erroneous reporting of smashed
  98. objects with debugging allocation.
  99. - Fixed bogus leak reports of size 4096 blocks with FIND_LEAK.
  100. Version 3.2 fixed a serious and not entirely repeatable bug in
  101. the incremental collector. It appeared only when dirty bit info
  102. on the roots was available, which is normally only under Solaris.
  103. It also added GC_general_register_disappearing_link, and some
  104. testing code. Interface.c disappeared.
  105. Version 3.3 fixes several bugs and adds new ports:
  106. - PCR-specific bugs.
  107. - Missing locking in GC_free, redundant FASTUNLOCK
  108. in GC_malloc_stubborn, and 2 bugs in
  109. GC_unregister_disappearing_link.
  110. All of the above were pointed out by Neil Sharman
  111. (neil@cs.mu.oz.au).
  112. - Common symbols allocated by the SunOS4.X dynamic loader
  113. were not included in the root set.
  114. - Bug in GC_finalize (reported by Brian Beuning and Al Dosser)
  115. - Merged Amiga port from Jesper Peterson (untested)
  116. - Merged NeXT port from Thomas Funke (significantly
  117. modified and untested)
  118. Version 3.4:
  119. - Fixed a performance bug in GC_realloc.
  120. - Updated the amiga port.
  121. - Added NetBSD and 386BSD ports.
  122. - Added cord library.
  123. - Added trivial performance enhancement for
  124. ALL_INTERIOR_POINTERS. (Don't scan last word.)
  125. Version 3.5
  126. - Minor collections now mark from roots only once, if that
  127. doesn't cause an excessive pause.
  128. - The stack clearing heuristic was refined to prevent anomalies
  129. with very heavily recursive programs and sparse stacks.
  130. - Fixed a bug that prevented mark stack growth in some cases.
  131. GC_objects_are_marked should be set to TRUE after a call
  132. to GC_push_roots and as part of GC_push_marked, since
  133. both can now set mark bits. I think this is only a performance
  134. bug, but I wouldn't bet on it. It's certainly very hard to argue
  135. that the old version was correct.
  136. - Fixed an incremental collection bug that prevented it from
  137. working at all when HBLKSIZE != getpagesize()
  138. - Changed dynamic_loading.c to include gc_priv.h before testing
  139. DYNAMIC_LOADING. SunOS dynamic library scanning
  140. must have been broken in 3.4.
  141. - Object size rounding now adapts to program behavior.
  142. - Added a workaround (provided by Manuel Serrano and
  143. colleagues) to a long-standing SunOS 4.X (and 3.X?) ld bug
  144. that I had incorrectly assumed to have been squished.
  145. The collector was broken if the text segment size was within
  146. 32 bytes of a multiple of 8K bytes, and if the beginning of
  147. the data segment contained interesting roots. The workaround
  148. assumes a demand-loadable executable. The original may have
  149. have "worked" in some other cases.
  150. - Added dynamic library support under IRIX5.
  151. - Added support for EMX under OS/2 (thanks to Ari Huttunen).
  152. Version 3.6:
  153. - fixed a bug in the mark stack growth code that was introduced
  154. in 3.4.
  155. - fixed Makefile to work around DEC AXP compiler tail recursion
  156. bug.
  157. Version 3.7:
  158. - Added a workaround for an HP/UX compiler bug.
  159. - Fixed another stack clearing performance bug. Reworked
  160. that code once more.
  161. Version 4.0:
  162. - Added support for Solaris threads (which was possible
  163. only by reimplementing some fraction of Solaris threads,
  164. since Sun doesn't currently make the thread debugging
  165. interface available).
  166. - Added non-threads win32 and win32S support.
  167. - (Grudgingly, with suitable muttering of obscenities) renamed
  168. files so that the collector distribution could live on a FAT
  169. file system. Files that are guaranteed to be useless on
  170. a PC still have long names. Gc_inline.h and gc_private.h
  171. still exist, but now just include gc_inl.h and gc_priv.h.
  172. - Fixed a really obscure bug in finalization that could cause
  173. undetected mark stack overflows. (I would be surprised if
  174. any real code ever tickled this one.)
  175. - Changed finalization code to dynamically resize the hash
  176. tables it maintains. (This probably does not matter for well-
  177. -written code. It no doubt does for C++ code that overuses
  178. destructors.)
  179. - Added typed allocation primitives. Rewrote the marker to
  180. accommodate them with more reasonable efficiency. This
  181. change should also speed up marking for GC_malloc allocated
  182. objects a little. See gc_typed.h for new primitives.
  183. - Improved debugging facilities slightly. Allocation time
  184. stack traces are now kept by default on SPARC/SUNOS4.
  185. (Thanks to Scott Schwartz.)
  186. - Added better support for small heap applications.
  187. - Significantly extended cord package. Fixed a bug in the
  188. implementation of lazily read files. Printf and friends now
  189. have cord variants. Cord traversals are a bit faster.
  190. - Made ALL_INTERIOR_POINTERS recognition the default.
  191. - Fixed de so that it can run in constant space, independent
  192. of file size. Added simple string searching to cords and de.
  193. - Added the Hull-Ellis C++ interface.
  194. - Added dynamic library support for OSF/1.
  195. (Thanks to Al Dosser and Tim Bingham at DEC.)
  196. - Changed argument to GC_expand_hp to be expressed
  197. in units of bytes instead of heap blocks. (Necessary
  198. since the heap block size now varies depending on
  199. configuration. The old version was never very clean.)
  200. - Added GC_get_heap_size(). The previous "equivalent"
  201. was broken.
  202. - Restructured the Makefile a bit.
  203. Since version 4.0:
  204. - Changed finalization implementation to guarantee that
  205. finalization procedures are called outside of the allocation
  206. lock, making direct use of the interface a little less dangerous.
  207. MAY BREAK EXISTING CLIENTS that assume finalizers
  208. are protected by a lock. Since there seem to be few multithreaded
  209. clients that use finalization, this is hopefully not much of
  210. a problem.
  211. - Fixed a gross bug in CORD_prev.
  212. - Fixed a bug in blacklst.c that could result in unbounded
  213. heap growth during startup on machines that do not clear
  214. memory obtained from the OS (e.g. win32S).
  215. - Ported de editor to win32/win32S. (This is now the only
  216. version with a mouse-sensitive UI.)
  217. - Added GC_malloc_ignore_off_page to allocate large arrays
  218. in the presence of ALL_INTERIOR_POINTERS.
  219. - Changed GC_call_with_alloc_lock to not disable signals in
  220. the single-threaded case.
  221. - Reduced retry count in GC_collect_or_expand for garbage
  222. collecting when out of memory.
  223. - Made uncollectable allocations bypass black-listing, as they
  224. should.
  225. - Fixed a bug in typed_test in test.c that could cause (legitimate)
  226. GC crashes.
  227. - Fixed some potential synchronization problems in finalize.c
  228. - Fixed a real locking problem in typd_mlc.c.
  229. - Worked around an AIX 3.2 compiler feature that results in
  230. out of bounds memory references.
  231. - Partially worked around an IRIX5.2 beta problem (which may
  232. or may not persist to the final release).
  233. - Fixed a bug in the heap integrity checking code that could
  234. result in explicitly deallocated objects being identified as
  235. smashed. Fixed a bug in the dbg_mlc stack saving code
  236. that caused old argument pointers to be considered live.
  237. - Fixed a bug in CORD_ncmp (and hence CORD_str).
  238. - Repaired the OS2 port, which had suffered from bit rot
  239. in 4.0. Worked around what appears to be CSet/2 V1.0
  240. optimizer bug.
  241. - Fixed a Makefile bug for target "c++".
  242. Since version 4.1:
  243. - Multiple bug fixes/workarounds in the Solaris threads version.
  244. (It occasionally failed to locate some register contents for
  245. marking. It also turns out that thr_suspend and friends are
  246. unreliable in Solaris 2.3. Dirty bit reads appear
  247. to be unreliable under some weird
  248. circumstances. My stack marking code
  249. contained a serious performance bug. The new code is
  250. extremely defensive, and has not failed in several cpu
  251. hours of testing. But no guarantees ...)
  252. - Added MacOS support (thanks to Patrick Beard.)
  253. - Fixed several syntactic bugs in gc_c++.h and friends. (These
  254. didn't bother g++, but did bother most other compilers.)
  255. Fixed gc_c++.h finalization interface. (It didn't.)
  256. - 64 bit alignment for allocated objects was not guaranteed in a
  257. few cases in which it should have been.
  258. - Added GC_malloc_atomic_ignore_off_page.
  259. - Added GC_collect_a_little.
  260. - Added some prototypes to gc.h.
  261. - Some other minor bug fixes (notably in Makefile).
  262. - Fixed OS/2 / EMX port (thanks to Ari Huttunen).
  263. - Fixed AmigaDOS port. (thanks to Michel Schinz).
  264. - Fixed the DATASTART definition under Solaris. There
  265. was a 1 in 16K chance of the collector missing the first
  266. 64K of static data (and thus crashing).
  267. - Fixed some blatant anachronisms in the README file.
  268. - Fixed PCR-Makefile for upcoming PPCR release.
  269. Since version 4.2:
  270. - Fixed SPARC alignment problem with GC_DEBUG.
  271. - Fixed Solaris threads /proc workaround. The real
  272. problem was an interaction with mprotect.
  273. - Incorporated fix from Patrick Beard for gc_c++.h (now gc_cpp.h).
  274. - Slightly improved allocator space utilization by
  275. fixing the GC_size_map mechanism.
  276. - Integrated some Sony News and MIPS RISCos 4.51
  277. patches. (Thanks to Nobuyuki Hikichi of
  278. Software Research Associates, Inc. Japan)
  279. - Fixed HP_PA alignment problem. (Thanks to
  280. xjam@cork.cs.berkeley.edu.)
  281. - Added GC_same_obj and friends. Changed GC_base
  282. to return 0 for pointers past the end of large objects.
  283. Improved GC_base performance with ALL_INTERIOR_POINTERS
  284. on machines with a slow integer mod operation.
  285. Added GC_PTR_ADD, GC_PTR_STORE, etc. to prepare
  286. for preprocessor.
  287. - changed the default on most UNIX machines to be that
  288. signals are not disabled during critical GC operations.
  289. This is still ANSI-conforming, though somewhat dangerous
  290. in the presence of signal handlers. But the performance
  291. cost of the alternative is sometimes problematic.
  292. Can be changed back with a minor Makefile edit.
  293. - renamed IS_STRING in gc.h, to CORD_IS_STRING, thus
  294. following my own naming convention. Added the function
  295. CORD_to_const_char_star.
  296. - Fixed a gross bug in GC_finalize. Symptom: occasional
  297. address faults in that function. (Thanks to Anselm
  298. Baird-Smith (Anselm.BairdSmith@inria.fr)
  299. - Added port to ICL DRS6000 running DRS/NX. Restructured
  300. things a bit to factor out common code, and remove obsolete
  301. code. Collector should now run under SUNOS5 with either
  302. mprotect or /proc dirty bits. (Thanks to Douglas Steel
  303. (doug@wg.icl.co.uk)).
  304. - More bug fixes and workarounds for Solaris 2.X. (These were
  305. mostly related to putting the collector in a dynamic library,
  306. which didn't really work before. Also SOLARIS_THREADS
  307. didn't interact well with dl_open.) Thanks to btlewis@eng.sun.com.
  308. - Fixed a serious performance bug on the DEC Alpha. The text
  309. segment was getting registered as part of the root set.
  310. (Amazingly, the result was still fast enough that the bug
  311. was not conspicuous.) The fix works on OSF/1, version 1.3.
  312. Hopefully it also works on other versions of OSF/1 ...
  313. - Fixed a bug in GC_clear_roots.
  314. - Fixed a bug in GC_generic_malloc_words_small that broke
  315. gc_inl.h. (Reported by Antoine de Maricourt. I broke it
  316. in trying to tweak the Mac port.)
  317. - Fixed some problems with cord/de under Linux.
  318. - Fixed some cord problems, notably with CORD_riter4.
  319. - Added DG/UX port.
  320. Thanks to Ben A. Mesander (ben@piglet.cr.usgs.gov)
  321. - Added finalization registration routines with weaker ordering
  322. constraints. (This is necessary for C++ finalization with
  323. multiple inheritance, since the compiler often adds self-cycles.)
  324. - Filled the holes in the SCO port. (Thanks to Michael Arnoldus
  325. <chime@proinf.dk>.)
  326. - John Ellis' additions to the C++ support: From John:
  327. * I completely rewrote the documentation in the interface gc_c++.h
  328. (later renamed gc_cpp.h). I've tried to make it both clearer and more
  329. precise.
  330. * The definition of accessibility now ignores pointers from an
  331. finalizable object (an object with a clean-up function) to itself.
  332. This allows objects with virtual base classes to be finalizable by the
  333. collector. Compilers typically implement virtual base classes using
  334. pointers from an object to itself, which under the old definition of
  335. accessibility prevented objects with virtual base classes from ever
  336. being collected or finalized.
  337. * gc_cleanup now includes gc as a virtual base. This was enabled by
  338. the change in the definition of accessibility.
  339. * I added support for operator new[]. Since most (all?) compilers
  340. don't yet support operator new[], it is conditionalized on
  341. -DOPERATOR_NEW_ARRAY. The code is untested, but its trivial and looks
  342. correct.
  343. * The test program test_gc_c++ (later renamed test_cpp.cc)
  344. tries to test for the C++-specific functionality not tested by the
  345. other programs.
  346. - Added <unistd.h> include to misc.c. (Needed for ppcr.)
  347. - Added PowerMac port. (Thanks to Patrick Beard again.)
  348. - Fixed "srcdir"-related Makefile problems. Changed things so
  349. that all externally visible include files always appear in the
  350. include subdirectory of the source. Made gc.h directly
  351. includable from C++ code. (These were at Per
  352. Bothner's suggestion.)
  353. - Changed Intel code to also mark from ebp (Kevin Warne's
  354. suggestion).
  355. - Renamed C++ related files so they could live in a FAT
  356. file system. (Charles Fiterman's suggestion.)
  357. - Changed Windows NT Makefile to include C++ support in
  358. gc.lib. Added C++ test as Makefile target.
  359. Since version 4.3:
  360. - ASM_CLEAR_CODE was erroneously defined for HP
  361. PA machines, resulting in a compile error.
  362. - Fixed OS/2 Makefile to create a library. (Thanks to
  363. Mark Boulter (mboulter@vnet.ibm.com)).
  364. - Gc_cleanup objects didn't work if they were created on
  365. the stack. Fixed.
  366. - One copy of Gc_cpp.h in the distribution was out of
  367. synch, and failed to document some known compiler
  368. problems with explicit destructor invocation. Partially
  369. fixed. There are probably other compilers on which
  370. gc_cleanup is miscompiled.
  371. - Fixed Makefile to pass C compiler flags to C++ compiler.
  372. - Added Mac fixes.
  373. - Fixed os_dep.c to work around what appears to be
  374. a new and different VirtualQuery bug under newer
  375. versions of win32S.
  376. - GC_non_gc_bytes was not correctly maintained by
  377. GC_free. Fixed. Thanks to James Clark (jjc@jclark.com).
  378. - Added GC_set_max_heap_size.
  379. - Changed allocation code to ignore blacklisting if it is preventing
  380. use of a very large block of memory. This has the advantage
  381. that naive code allocating very large objects is much more
  382. likely to work. The downside is you might no
  383. longer find out that such code should really use
  384. GC_malloc_ignore_off_page.
  385. - Changed GC_printf under win32 to close and reopen the file
  386. between calls. FAT file systems otherwise make the log file
  387. useless for debugging.
  388. - Added GC_try_to_collect and GC_get_bytes_since_gc. These
  389. allow starting an abortable collection during idle times.
  390. This facility does not require special OS support. (Thanks to
  391. Michael Spertus of Geodesic Systems for suggesting this. It was
  392. actually an easy addition. Kumar Srikantan previously added a similar
  393. facility to a now ancient version of the collector. At the time
  394. this was much harder, and the result was less convincing.)
  395. - Added some support for the Borland development environment. (Thanks
  396. to John Ellis and Michael Spertus.)
  397. - Removed a misfeature from checksums.c that caused unexpected
  398. heap growth. (Thanks to Scott Schwartz.)
  399. - Changed finalize.c to call WARN if it encounters a finalization cycle.
  400. WARN is defined in gc_priv.h to write a message, usually to stdout.
  401. In many environments, this may be inappropriate.
  402. - Renamed NO_PARAMS in gc.h to GC_NO_PARAMS, thus adhering to my own
  403. naming convention.
  404. - Added GC_set_warn_proc to intercept warnings.
  405. - Fixed Amiga port. (Thanks to Michel Schinz (schinz@alphanet.ch).)
  406. - Fixed a bug in mark.c that could result in an access to unmapped
  407. memory from GC_mark_from_mark_stack on machines with unaligned
  408. pointers.
  409. - Fixed a win32 specific performance bug that could result in scanning of
  410. objects allocated with the system malloc.
  411. - Added REDIRECT_MALLOC.
  412. Since version 4.4:
  413. - Fixed many minor and one major README bugs. (Thanks to Franklin Chen
  414. (chen@adi.com) for pointing out many of them.)
  415. - Fixed ALPHA/OSF/1 dynamic library support. (Thanks to Jonathan Bachrach
  416. (jonathan@harlequin.com)).
  417. - Added incremental GC support (MPROTECT_VDB) for Linux (with some
  418. help from Bruno Haible).
  419. - Altered SPARC recognition tests in gc.h and config.h (mostly as
  420. suggested by Fergus Henderson).
  421. - Added basic incremental GC support for win32, as implemented by
  422. Windows NT and Windows 95. GC_enable_incremental is a noop
  423. under win32s, which doesn't implement enough of the VM interface.
  424. - Added -DLARGE_CONFIG.
  425. - Fixed GC_..._ignore_off_page to also function without
  426. -DALL_INTERIOR_POINTERS.
  427. - (Hopefully) fixed RS/6000 port. (Only the test was broken.)
  428. - Fixed a performance bug in the nonincremental collector running
  429. on machines supporting incremental collection with MPROTECT_VDB
  430. (e.g. SunOS 4, DEC AXP). This turned into a correctness bug under
  431. win32s with win32 incremental collection. (Not all memory protection
  432. was disabled.)
  433. - Fixed some ppcr related bit rot.
  434. - Caused dynamic libraries to be unregistered before reregistering.
  435. The old way turned out to be a performance bug on some machines.
  436. - GC_root_size was not properly maintained under MSWIN32.
  437. - Added -DNO_DEBUGGING and GC_dump.
  438. - Fixed a couple of bugs arising with SOLARIS_THREADS +
  439. REDIRECT_MALLOC.
  440. - Added NetBSD/M68K port. (Thanks to Peter Seebach
  441. <seebs@taniemarie.solon.com>.)
  442. - Fixed a serious realloc bug. For certain object sizes, the collector
  443. wouldn't scan the expanded part of the object. (Thanks to Clay Spence
  444. (cds@peanut.sarnoff.com) for noticing the problem, and helping me to
  445. track it down.)
  446. Since version 4.5:
  447. - Added Linux ELF support. (Thanks to Arrigo Triulzi <arrigo@ic.ac.uk>.)
  448. - GC_base crashed if it was called before any other GC_ routines.
  449. This could happen if a gc_cleanup object was allocated outside the heap
  450. before any heap allocation.
  451. - The heap expansion heuristic was not stable if all objects had finalization
  452. enabled. Fixed finalize.c to count memory in finalization queue and
  453. avoid explicit deallocation. Changed alloc.c to also consider this count.
  454. (This is still not recommended. It's expensive if nothing else.) Thanks
  455. to John Ellis for pointing this out.
  456. - GC_malloc_uncollectable(0) was broken. Thanks to Phong Vo for pointing
  457. this out.
  458. - The collector didn't compile under Linux 1.3.X. (Thanks to Fred Gilham for
  459. pointing this out.) The current workaround is ugly, but expected to be
  460. temporary.
  461. - Fixed a formatting problem for SPARC stack traces.
  462. - Fixed some '=='s in os_dep.c that should have been assignments.
  463. Fortunately these were in code that should never be executed anyway.
  464. (Thanks to Fergus Henderson.)
  465. - Fixed the heap block allocator to only drop blacklisted blocks in small
  466. chunks. Made BL_LIMIT self adjusting. (Both of these were in response
  467. to heap growth observed by Paul Graham.)
  468. - Fixed the Metrowerks/68K Mac code to also mark from a6. (Thanks
  469. to Patrick Beard.)
  470. - Significantly updated README.debugging.
  471. - Fixed some problems with longjmps out of signal handlers, especially under
  472. Solaris. Added a workaround for the fact that siglongjmp doesn't appear to
  473. do the right thing with -lthread under Solaris.
  474. - Added MSDOS/djgpp port. (Thanks to Mitch Harris (maharri@uiuc.edu).)
  475. - Added "make reserved_namespace" and "make user_namespace". The
  476. first renames ALL "GC_xxx" identifiers as "_GC_xxx". The second is the
  477. inverse transformation. Note that doing this is guaranteed to break all
  478. clients written for the other names.
  479. - descriptor field for kind NORMAL in GC_obj_kinds with ADD_BYTE_AT_END
  480. defined should be -ALIGNMENT not WORDS_TO_BYTES(-1). This is
  481. a serious bug on machines with pointer alignment of less than a word.
  482. - GC_ignore_self_finalize_mark_proc didn't handle pointers to very near the
  483. end of the object correctly. Caused failures of the C++ test on a DEC Alpha
  484. with g++.
  485. - gc_inl.h still had problems. Partially fixed. Added warnings at the
  486. beginning to hopefully specify the remaining dangers.
  487. - Added DATAEND definition to config.h.
  488. - Fixed some of the .h file organization. Fixed "make floppy".
  489. Since version 4.6:
  490. - Fixed some compilation problems with -DCHECKSUMS (thanks to Ian Searle)
  491. - Updated some Mac specific files to synchronize with Patrick Beard.
  492. - Fixed a serious bug for machines with non-word-aligned pointers.
  493. (Thanks to Patrick Beard for pointing out the problem. The collector
  494. should fail almost any conceivable test immediately on such machines.)
  495. Since version 4.7:
  496. - Changed a "comment" in a MacOS specific part of mach-dep.c that caused
  497. gcc to fail on other platforms.
  498. Since version 4.8
  499. - More README.debugging fixes.
  500. - Objects ready for finalization, but not finalized in the same GC
  501. cycle, could be prematurely collected. This occasionally happened
  502. in test_cpp.
  503. - Too little memory was obtained from the system for very large
  504. objects. That could cause a heap explosion if these objects were
  505. not contiguous (e.g. under PCR), and too much of them was blacklisted.
  506. - Due to an improper initialization, the collector was too hesitant to
  507. allocate blacklisted objects immediately after system startup.
  508. - Moved GC_arrays from the data into the bss segment by not explicitly
  509. initializing it to zero. This significantly
  510. reduces the size of executables, and probably avoids some disk accesses
  511. on program startup. It's conceivable that it might break a port that I
  512. didn't test.
  513. - Fixed EMX_MAKEFILE to reflect the gc_c++.h to gc_cpp.h renaming which
  514. occurred a while ago.
  515. Since 4.9:
  516. - Fixed a typo around a call to GC_collect_or_expand in alloc.c. It broke
  517. handling of out of memory. (Thanks to Patrick Beard for noticing.)
  518. Since 4.10:
  519. - Rationalized (hopefully) GC_try_to_collect in an incremental collection
  520. environment. It appeared to not handle a call while a collection was in
  521. progress, and was otherwise too conservative.
  522. - Merged GC_reclaim_or_delete_all into GC_reclaim_all to get rid of some
  523. code.
  524. - Added Patrick Beard's Mac fixes, with substantial completely untested
  525. modifications.
  526. - Fixed the MPROTECT_VDB code to deal with large pages and imprecise
  527. fault addresses (as on an UltraSPARC running Solaris 2.5). Note that this
  528. was not a problem in the default configuration, which uses PROC_VDB.
  529. - The DEC Alpha assembly code needed to restore $gp between calls.
  530. Thanks to Fergus Henderson for tracking this down and supplying a
  531. patch.
  532. - The write command for "de" was completely broken for large files.
  533. I used the easiest portable fix, which involved changing the semantics
  534. so that f.new is written instead of overwriting f. That's safer anyway.
  535. - Added README.solaris2 with a discussion of the possible problems of
  536. mixing the collector's sbrk allocation with malloc/realloc.
  537. - Changed the data segment starting address for SGI machines. The
  538. old code failed under IRIX6.
  539. - Required double word alignment for MIPS.
  540. - Various minor fixes to remove warnings.
  541. - Attempted to fix some Solaris threads problems reported by Zhiying Chen.
  542. In particular, the collector could try to fork a thread with the
  543. world stopped as part of GC_thr_init. It also failed to deal with
  544. the case in which the original thread terminated before the whole
  545. process did.
  546. - Added -DNO_EXECUTE_PERMISSION. This has a major performance impact
  547. on the incremental collector under Irix, and perhaps under other
  548. operating systems.
  549. - Added some code to support allocating the heap with mmap. This may
  550. be preferable under some circumstances.
  551. - Integrated dynamic library support for HP.
  552. (Thanks to Knut Tvedten <knuttv@ifi.uio.no>.)
  553. - Integrated James Clark's win32 threads support, and made a number
  554. of changes to it, many of which were suggested by Pontus Rydin.
  555. This is still not 100% solid.
  556. - Integrated Alistair Crooks' support for UTS4 running on an Amdahl
  557. 370-class machine.
  558. - Fixed a serious bug in explicitly typed allocation. Objects requiring
  559. large descriptors where handled in a way that usually resulted in
  560. a segmentation fault in the marker. (Thanks to Jeremy Fitzhardinge
  561. for helping to track this down.)
  562. - Added partial support for GNU win32 development. (Thanks to Fergus
  563. Henderson.)
  564. - Added optional support for Java-style finalization semantics. (Thanks
  565. to Patrick Bridges.) This is recommended only for Java implementations.
  566. - GC_malloc_uncollectable faulted instead of returning 0 when out of
  567. memory. (Thanks to dan@math.uiuc.edu for noticing.)
  568. - Calls to GC_base before the collector was initialized failed on a
  569. DEC Alpha. (Thanks to Matthew Flatt.)
  570. - Added base pointer checking to GC_REGISTER_FINALIZER in debugging
  571. mode, at the suggestion of Jeremy Fitzhardinge.
  572. - GC_debug_realloc failed for uncollectable objects. (Thanks to
  573. Jeremy Fitzhardinge.)
  574. - Explicitly typed allocation could crash if it ran out of memory.
  575. (Thanks to Jeremy Fitzhardinge.)
  576. - Added minimal support for a DEC Alpha running Linux.
  577. - Fixed a problem with allocation of objects whose size overflowed
  578. ptrdiff_t. (This now fails unconditionally, as it should.)
  579. - Added the beginning of Irix pthread support.
  580. - Integrated Xiaokun Zhu's fixes for djgpp 2.01.
  581. - Added SGI-style STL allocator support (gc_alloc.h).
  582. - Fixed a serious bug in README.solaris2. Multithreaded programs must include
  583. gc.h with SOLARIS_THREADS defined.
  584. - Changed GC_free so it actually deallocates uncollectable objects.
  585. (Thanks to Peter Chubb for pointing out the problem.)
  586. - Added Linux ELF support for dynamic libararies. (Thanks again to
  587. Patrick Bridges.)
  588. - Changed the Borland cc configuration so that the assembler is not
  589. required.
  590. - Fixed a bug in the C++ test that caused it to fail in 64-bit
  591. environments.
  592. Since 4.11:
  593. - Fixed ElfW definition in dyn_load.c. (Thanks to Fergus Henderson.)
  594. This prevented the dynamic library support from compiling on some
  595. older ELF Linux systems.
  596. - Fixed UTS4 port (which I apparently mangled during the integration)
  597. (Thanks to again to Alistair Crooks.)
  598. - "Make C++" failed on Suns with SC4.0, due to a problem with "bool".
  599. Fixed in gc_priv.h.
  600. - Added more pieces for GNU win32. (Thanks to Timothy N. Newsham.)
  601. The current state of things should suffice for at least some
  602. applications.
  603. - Changed the out of memory retry count handling as suggested by
  604. Kenjiro Taura. (This matters only if GC_max_retries > 0, which
  605. is no longer the default.)
  606. - If a /proc read failed repeatedly, GC_written_pages was not updated
  607. correctly. (Thanks to Peter Chubb for diagnosing this.)
  608. - Under unlikely circumstances, the allocator could infinite loop in
  609. an out of memory situation. (Thanks again to Kenjiro Taura for
  610. identifying the problem and supplying a fix.)
  611. - Fixed a syntactic error in the DJGPP code. (Thanks to Fergus
  612. Henderson for finding this by inspection.) Also fixed a test program
  613. problem with DJGPP (Thanks to Peter Monks.)
  614. - Atomic uncollectable objects were not treated correctly by the
  615. incremental collector. This resulted in weird log statistics and
  616. occasional performance problems. (Thanks to Peter Chubb for pointing
  617. this out.)
  618. - Fixed some problems resulting from compilers that dont define
  619. __STDC__. In this case void * and char * were used inconsistently
  620. in some cases. (Void * should not have been used at all. If
  621. you have an ANSI superset compiler that does not define __STDC__,
  622. please compile with -D__STDC__=0. Thanks to Manuel Serrano and others
  623. for pointing out the problem.)
  624. - Fixed a compilation problem on Irix with -n32 and -DIRIX_THREADS.
  625. Also fixed some other IRIX_THREADS problems which may or may not have
  626. had observable symptoms.
  627. - Fixed an HP PA compilation problem in dyn_load.c. (Thanks to
  628. Philippe Queinnec.)
  629. - SEGV fault handlers sometimes did not get reset correctly. (Thanks
  630. to David Pickens.)
  631. - Added a fix for SOLARIS_THREADS on Intel. (Thanks again to David
  632. Pickens.) This probably needs more work to become functional.
  633. - Fixed struct sigcontext_struct in os_dep.c for compilation under
  634. Linux 2.1.X. (Thanks to Fergus Henderson.)
  635. - Changed the DJGPP STACKBOTTOM and DATASTART values to those suggested
  636. by Kristian Kristensen. These may still not be right, but it is
  637. it is likely to work more often than what was there before. They may
  638. even be exactly right.
  639. - Added a #include <string.h> to test_cpp.cc. This appears to help
  640. with HP/UX and gcc. (Thanks to assar@sics.se.)
  641. - Version 4.11 failed to run in incremental mode on recent 64-bit Irix
  642. kernels. This was a problem related to page unaligned heap segments.
  643. Changed the code to page align heap sections on all platforms.
  644. (I had mistakenly identified this as a kernel problem earlier.
  645. It was not.)
  646. - Version 4.11 did not make allocated storage executable, except on
  647. one or two platforms, due to a bug in a #if test. (Thanks to Dave
  648. Grove for pointing this out.)
  649. - Added sparc_sunos4_mach_dep.s to support Sun's compilers under SunOS4.
  650. - Added GC_exclude_static_roots.
  651. - Fixed the object size mapping algorithm. This shouldn't matter,
  652. but the old code was ugly.
  653. - Heap checking code could die if one of the allocated objects was
  654. larger than its base address. (Unsigned underflow problem. Thanks
  655. to Clay Spence for isolating the problem.)
  656. - Added RS6000 (AIX) dynamic library support and fixed STACK_BOTTOM.
  657. (Thanks to Fred Stearns.)
  658. - Added Fergus Henderson's patches for improved robustness with large
  659. heaps and lots of blacklisting.
  660. - Added Peter Chubb's changes to support Solaris Pthreads, to support
  661. MMAP allocation in Solaris, to allow Solaris to find dynamic libraries
  662. through /proc, to add malloc_typed_ignore_off_page, and a few other
  663. minor features and bug fixes.
  664. - The Solaris 2 port should not use sbrk. I received confirmation from
  665. Sun that the use of sbrk and malloc in the same program is not
  666. supported. The collector now defines USE_MMAP by default on Solaris.
  667. - Replaced the djgpp makefile with Gary Leavens' version.
  668. - Fixed MSWIN32 detection test.
  669. - Added Fergus Henderson's patches to allow putting the collector into
  670. a DLL under GNU win32.
  671. - Added Ivan V. Demakov's port to Watcom C on X86.
  672. - Added Ian Piumarta's Linux/PowerPC port.
  673. - On Brian Burton's suggestion added PointerFreeGC to the placement
  674. options in gc_cpp.h. This is of course unsafe, and may be controversial.
  675. On the other hand, it seems to be needed often enough that it's worth
  676. adding as a standard facility.
  677. Since 4.12:
  678. - Fixed a crucial bug in the Watcom port. There was a redundant decl
  679. of GC_push_one in gc_priv.h.
  680. - Added FINALIZE_ON_DEMAND.
  681. - Fixed some pre-ANSI cc problems in test.c.
  682. - Removed getpagesize() use for Solaris. It seems to be missing in one
  683. or two versions.
  684. - Fixed bool handling for SPARCCompiler version 4.2.
  685. - Fixed some files in include that had gotten unlinked from the main
  686. copy.
  687. - Some RS/6000 fixes (missing casts). Thanks to Toralf Foerster.
  688. - Fixed several problems in GC_debug_realloc, affecting mostly the
  689. FIND_LEAK case.
  690. - GC_exclude_static_roots contained a buggy unsigned comparison to
  691. terminate a loop. (Thanks to Wilson Ho.)
  692. - CORD_str failed if the substring occurred at the last possible position.
  693. (Only affects cord users.)
  694. - Fixed Linux code to deal with RedHat 5.0 and integrated Peter Bigot's
  695. os_dep.c code for dealing with various Linux versions.
  696. - Added workaround for Irix pthreads sigaction bug and possible signal
  697. misdirection problems.
  698. Since alpha1:
  699. - Changed RS6000 STACKBOTTOM.
  700. - Integrated Patrick Beard's Mac changes.
  701. - Alpha1 didn't compile on Irix m.n, m < 6.
  702. - Replaced Makefile.dj with a new one from Gary Leavens.
  703. - Added Andrew Stitcher's changes to support SCO OpenServer.
  704. - Added PRINT_BLACK_LIST, to allow debugging of high densities of false
  705. pointers.
  706. - Added code to debug allocator to keep track of return address
  707. in GC_malloc caller, thus giving a bit more context.
  708. - Changed default behavior of large block allocator to more
  709. aggressively avoid fragmentation. This is likely to slow down the
  710. collector when it succeeds at reducing space cost.
  711. - Integrated Fergus Henderson's CYGWIN32 changes. They are untested,
  712. but needed for newer versions.
  713. - USE_MMAP had some serious bugs. This caused the collector to fail
  714. consistently on Solaris with -DSMALL_CONFIG.
  715. - Added Linux threads support, thanks largely to Fergus Henderson.
  716. Since alpha2:
  717. - Fixed more Linux threads problems.
  718. - Changed default GC_free_space_divisor to 3 with new large block allocation.
  719. (Thanks to Matthew Flatt for some measurements that suggest the old
  720. value sometimes favors space too much over time.)
  721. - More CYGWIN32 fixes.
  722. - Integrated Tyson-Dowd's Linux-M68K port.
  723. - Minor HP PA and DEC UNIX fixes from Fergus Henderson.
  724. - Integrated Christoffe Raffali's Linux-SPARC changes.
  725. - Allowed for one more GC fixup iteration after a full GC in incremental
  726. mode. Some quick measurements suggested that this significantly
  727. reduces pause times even with smaller GC_RATE values.
  728. - Moved some more GC data structures into GC_arrays. This decreases
  729. pause times and GC overhead, but makes debugging slightly less convenient.
  730. - Fixed namespace pollution problem ("excl_table").
  731. - Made GC_incremental a constant for -DSMALL_CONFIG, hopefully shrinking
  732. that slightly.
  733. - Added some win32 threads fixes.
  734. - Integrated Ivan Demakov and David Stes' Watcom fixes.
  735. - Various other minor fixes contributed by many people.
  736. - Renamed config.h to gcconfig.h, since config.h tends to be used for
  737. many other things.
  738. - Integrated Matthew Flatt's support for 68K MacOS "far globals".
  739. - Fixed up some of the dynamic library Makefile targets for consistency
  740. across platforms.
  741. - Fixed a USE_MMAP typo that caused out-of-memory handling to fail
  742. on Solaris.
  743. - Added code to test.c to test thread creation a bit more.
  744. - Integrated GC_win32_free_heap, as suggested by Ivan Demakov.
  745. - Fixed Solaris 2.7 stack base finding problem. (This may actually
  746. have been done in an earlier alpha release.)
  747. Since alpha3:
  748. - Fixed MSWIN32 recognition test, which interfered with cygwin.
  749. - Removed unnecessary gc_watcom.asm from distribution. Removed
  750. some obsolete README.win32 text.
  751. - Added Alpha Linux incremental GC support. (Thanks to Philipp Tomsich
  752. for code for retrieving the fault address in a signal handler.)
  753. Changed Linux signal handler context argument to be a pointer.
  754. - Took care of some new warnings generated by the 7.3 SGI compiler.
  755. - Integrated Phillip Musumeci's FreeBSD/ELF fixes.
  756. - -DIRIX_THREADS was broken with the -o32 ABI (typo in gc_priv.h>
  757. Since 4.13:
  758. - Fixed GC_print_source_ptr to not use a prototype.
  759. - generalized CYGWIN test.
  760. - gc::new did the wrong thing with PointerFreeGC placement.
  761. (Thanks to Rauli Ruohonen.)
  762. - In the ALL_INTERIOR_POINTERS (default) case, some callee-save register
  763. values could fail to be scanned if the register was saved and
  764. reused in a GC frame. This showed up in verbose mode with gctest
  765. compiled with an unreleased SGI compiler. I vaguely recall an old
  766. bug report that may have been related. The bug was probably quite old.
  767. (The problem was that the stack scanning could be deferred until
  768. after the relevant frame was overwritten, and the new save location
  769. might be outside the scanned area. Fixed by more eager stack scanning.)
  770. - PRINT_BLACK_LIST had some problems. A few source addresses were garbage.
  771. - Replaced Makefile.dj and added -I flags to cord make targets.
  772. (Thanks to Gary Leavens.)
  773. - GC_try_to_collect was broken with the nonincremental collector.
  774. - gc_cleanup destructors could pass the wrong address to
  775. GC_register_finalizer_ignore_self in the presence of multiple
  776. inheritance. (Thanks to Darrell Schiebel.)
  777. - Changed PowerPC Linux stack finding code.
  778. Since 4.14alpha1
  779. - -DSMALL_CONFIG did not work reliably with large (> 4K) pages.
  780. Recycling the mark stack during expansion could result in a size
  781. zero heap segment, which confused things. (This was probably also an
  782. issue with the normal config and huge pages.)
  783. - Did more work to make sure that callee-save registers were scanned
  784. completely, even with the setjmp-based code. Added USE_GENERIC_PUSH_REGS
  785. macro to facilitate testing on machines I have access to.
  786. - Added code to explicitly push register contents for win32 threads.
  787. This seems to be necessary. (Thanks to Pierre de Rop.)
  788. Since 4.14alpha2
  789. - changed STACKBOTTOM for DJGPP (Thanks to Salvador Eduardo Tropea).
  790. Since 4.14
  791. - Reworked large block allocator. Now uses multiple doubly linked free
  792. lists to approximate best fit.
  793. - Changed heap expansion heuristic. Entirely free blocks are no longer
  794. counted towards the heap size. This seems to have a major impact on
  795. heap size stability; the old version could expand the heap way too
  796. much in the presence of large block fragmentation.
  797. - added -DGC_ASSERTIONS and some simple assertions inside the collector.
  798. This is mainlyt for collector debugging.
  799. - added -DUSE_MUNMAP to allow the heap to shrink. Suupported on only
  800. a few UNIX-like platforms for now.
  801. - added GC_dump_regions() for debugging of fragmentation issues.
  802. - Changed PowerPC pointer alignment under Linux to 4. (This needs
  803. checking by someone who has one. The suggestions came to me via a
  804. rather circuitous path.)
  805. - Changed the Linux/Alpha port to walk the data segment backwards until
  806. it encounters a SIGSEGV. The old way to find the start of the data
  807. segment broke with a recent release.
  808. - cordxtra.c needed to call GC_REGISTER_FINALIZER instead of
  809. GC_register_finalizer, so that it would continue to work with GC_DEBUG.
  810. - allochblk sometimes cleared the wrong block for debugging purposes
  811. when it dropped blacklisted blocks. This could result in spurious
  812. error reports with GC_DEBUG.
  813. - added MACOS X Server support. (Thanks to Andrew Stone.)
  814. - Changed the Solaris threads code to ignore stack limits > 8 MB with
  815. a warning. Empirically, it is not safe to access arbitrary pages
  816. in such large stacks. And the dirty bit implementation does not
  817. guarantee that none of them will be accessed.
  818. - Integrated Martin Tauchmann's Amiga changes.
  819. - Integrated James Dominy's OpenBSD/SPARC port.
  820. Since 5.0alpha1
  821. - Fixed bugs introduced in alpha1 (OpenBSD & large block initialization).
  822. - Added -DKEEP_BACK_PTRS and backptr.h interface. (The implementation
  823. idea came from Al Demers.)
  824. Since 5.0alpha2
  825. - Added some highly incomplete code to support a copied young generation.
  826. Comments on nursery.h are appreciated.
  827. - Changed -DFIND_LEAK, -DJAVA_FINALIZATION, and -DFINALIZE_ON_DEMAND,
  828. so the same effect could be obtained with a runtime switch. This is
  829. a step towards standardizing on a single dynamic GC library.
  830. - Significantly changed the way leak detection is handled, as a consequence
  831. of the above.
  832. Since 5.0 alpha3
  833. - Added protection fault handling patch for Linux/M68K from Fergus
  834. Henderson and Roman Hodek.
  835. - Removed the tests for SGI_SOURCE in new_gc_alloc.h. This was causing that
  836. interface to fail on nonSGI platforms.
  837. - Changed the Linux stack finding code to use /proc, after changing it
  838. to use HEURISTIC1. (Thanks to David Mossberger for pointing out the
  839. /proc hook.)
  840. - Added HP/UX incremental GC support and HP/UX 11 thread support.
  841. Thread support is currently still flakey.
  842. - Added basic Linux/IA64 support.
  843. - Integrated Anthony Green's PicoJava support.
  844. - Integrated Scott Ananian's StrongARM/NetBSD support.
  845. - Fixed some fairly serious performance bugs in the incremental
  846. collector. These have probably been there essentially forever.
  847. (Mark bits were sometimes set before scanning dirty pages.
  848. The reclaim phase unnecessarily dirtied full small object pages.)
  849. - Changed the reclaim phase to ignore nearly full pages to avoid
  850. touching them.
  851. - Limited GC_black_list_spacing to roughly the heap growth increment.
  852. - Changed full collection triggering heuristic to decrease full GC
  853. frequency by default, but to explicitly trigger full GCs during
  854. heap growth. This doesn't always improve things, but on average it's
  855. probably a win.
  856. - GC_debug_free(0, ...) failed. Thanks to Fergus Henderson for the
  857. bug report and fix.
  858. Since 5.0 alpha4
  859. - GC_malloc_explicitly_typed and friends sometimes failed to
  860. initialize first word.
  861. - Added allocation routines and support in the marker for mark descriptors
  862. in a type structure referenced by the first word of an object. This was
  863. introduced to support gcj, but hopefully in a way that makes it
  864. generically useful.
  865. - Added GC_requested_heapsize, and inhibited collections in nonincremental
  866. mode if the actual used heap size is less than what was explicitly
  867. requested.
  868. - The Solaris pthreads version of GC_pthread_create didn't handle a NULL
  869. attribute pointer. Solaris thread support used the wrong default thread
  870. stack size. (Thanks to Melissa O'Neill for the patch.)
  871. - Changed PUSH_CONTENTS macro to no longer modify first parameter.
  872. This usually doesn't matter, but it was certainly an accident waiting
  873. to happen ...
  874. - Added GC_register_finalizer_no_order and friends to gc.h. They're
  875. needed by Java implementations.
  876. - Integrated a fix for a win32 deadlock resulting from clock() calling
  877. malloc. (Thanks to Chris Dodd.)
  878. - Integrated Hiroshi Kawashima's port to Linux/MIPS. This was designed
  879. for a handheld platform, and may or may not be sufficient for other
  880. machines.
  881. - Fixed a va_arg problem with the %c specifier in cordprnt.c. It appears
  882. that this was always broken, but recent versions of gcc are the first to
  883. report the (statically detectable) bug.
  884. - Added an attempt at a more general solution to dlopen races/deadlocks.
  885. GC_dlopen now temporarily disables collection. Still not ideal, but ...
  886. - Added -DUSE_I686_PREFETCH, -DUSE_3DNOW_PREFETCH, and support for IA64
  887. prefetch instructions. May improve performance measurably, but I'm not
  888. sure the code will run correctly on processors that don't support the
  889. instruction. Won't build except with very recent gcc.
  890. - Added caching for header lookups in the marker. This seems to result
  891. in a barely measurable performance gain. Added support for interleaved
  892. lookups of two pointers, but unconfigured that since the performance
  893. gain is currently near zero, and it adds to code size.
  894. - Changed Linux DATA_START definition to check both data_start and
  895. __data_start, since nothing else seems to be portable.
  896. - Added -DUSE_LD_WRAP to optionally take advantage of the GNU ld function
  897. wrapping mechanism. Probably currently useful only on Linux.
  898. - Moved some variables for the scratch allocator into GC_arrays, on
  899. Martin Hirzel's suggestion.
  900. - Fixed a win32 threads bug that caused the collector to not look for
  901. interior pointers from one of the thread stacks without
  902. ALL_INTERIOR_POINTERS. (Thanks to Jeff Sturm.)
  903. - Added Mingw32 support. (Thanks again to Jeff Sturm for the patch.)
  904. - Changed the alpha port to use the generic register scanning code instead
  905. of alpha_mach_dep.s. Alpha_mach_dep.s doesn't look for pointers in fp
  906. registers, but gcc sometimes spills pointers there. (Thanks to Manuel
  907. Serrano for helping me debug this by email.) Changed the IA64 code to
  908. do something similar for similar reasons.
  909. [5.0alpha5 doesn't really exist, but it may have escaped.]
  910. Since 5.0alpha6:
  911. - -DREDIRECT_MALLOC was broken in alpha6. Fixed.
  912. - Cleaned up gc_ccp.h slightly, thus also causing the HP C++ compiler to
  913. accept it.
  914. - Removed accidental reference to dbg_mlc.c, which caused dbg_mlc.o to be
  915. linked into every executable.
  916. - Added PREFETCH to bitmap marker. Changed it to use the header cache.
  917. - GC_push_marked sometimes pushed one object too many, resulting in a
  918. segmentation fault in GC_mark_from_mark_stack. This was probably an old
  919. bug. It finally showed up in gctest on win32.
  920. - Gc_priv.h erroneously #defined GC_incremental to be TRUE instead of FALSE
  921. when SMALL_CONFIG was defined. This was no doubt a major performance bug for
  922. the default win32 configuration.
  923. - Removed -DSMALL_CONFIG from NT_MAKEFILE. It seemed like an anchronism now
  924. that the average PC has 64MB or so.
  925. - Integrated Bryce McKinley's patches for linux threads and dynamic loading
  926. from the libgcj tree. Turned on dynamic loading support for Linux/PPC.
  927. - Changed the stack finding code to use environ on HP/UX. (Thanks
  928. to Gustavo Rodriguez-Rivera for the suggestion.) This should probably
  929. be done on other platforms, too. Since I can't test those, that'll
  930. wait until after 5.0.
  931. Since 5.0alpha7:
  932. - Fixed threadlibs.c for linux threads. -DUSE_LD_WRAP was broken and
  933. -ldl was omitted. Fixed Linux stack finding code to handle
  934. -DUSE_LD_WRAP correctly.
  935. - Added MSWIN32 exception handler around marker, so that the collector
  936. can recover from root segments that are unmapped during the collection.
  937. This caused occasional failures under Windows 98, and may also be
  938. an issue under Windows NT/2000.
  939. Since 5.0
  940. - Fixed a gc.h header bug which showed up under Irix. (Thanks to
  941. Dan Sullivan.)
  942. - Fixed a typo in GC_double_descr in typd_mlc.c.
  943. This probably could result in objects described by array descriptors not
  944. getting traced correctly. (Thanks to Ben Hutchings for pointing this out.)
  945. - The block nearly full tests in reclaim.c were not correct for 64 bit
  946. environments. This could result in unnecessary heap growth under unlikely
  947. conditions.
  948. Since 5.1
  949. - dyn_load.c declared GC_scratch_last_end_ptr as an extern even if it
  950. was defined as a macro. This prevented the collector from building on
  951. Irix.
  952. - We quietly assumed that indirect mark descriptors were never 0.
  953. Our own typed allocation interface violated that. This could result
  954. in segmentation faults in the marker with typed allocation.
  955. - Fixed a _DUSE_MUNMAP bug in the heap block allocation code.
  956. (Thanks to Ben Hutchings for the patch.)
  957. - Taught the collector about VC++ handling array operator new.
  958. (Thanks again to Ben Hutchings for the patch.)
  959. - The two copies of gc_hdrs.h had diverged. Made one a link to the other
  960. again.
  961. Since 5.2 (A few 5.2 patches are not in 6.0alpha1)
  962. - Fixed _end declaration for OSF1.
  963. - There were lots of spurious leak reports in leak detection mode, caused
  964. by the fact that some pages were not being swept, and hence unmarked
  965. objects weren't making it onto free lists. (This bug dated back to 5.0.)
  966. - Fixed a typo in the liblinuxgc.so Makefile rule.
  967. - Added the GetExitCodeThread to Win32 GC_stop_world to (mostly) work
  968. around a Windows 95 GetOpenFileName problem. (Thanks to Jacob Navia.)
  969. Since 5.3
  970. - Fixed a typo that prevented compilation with -DUSE_3DNOW_PREFETCH.
  971. (Thanks to Shawn Wagner for actually testing this.)
  972. - Fixed GC_is_thread_stack in solaris_threads.c. It forgot to return a value
  973. in the common case. I wonder why nobody noticed?
  974. - Fixed another silly syntax problem in GC_double_descr. (Thanks to
  975. Fergus Henderson for finding it.)
  976. - Fixed a GC_gcj_malloc bug: It tended to release the allocator lock twice.
  977. Since 5.4 (A few 5.3 patches are not in 6.0alpha2)
  978. - Added HP/PA prefetch support.
  979. - Added -DDBG_HDRS_ALL and -DSHORT_DBG_HDRS to reduce the cost and improve
  980. the reliability of generating pointer backtrace information, e.g. in
  981. the Bigloo environment.
  982. - Added parallel marking support (-DPARALLEL_MARK). This currently
  983. works only under IA32 and IA64 Linux, but it shouldn't be hard to adapt
  984. to other platforms. This is intended to be a lighter-weight (less
  985. new code, probably not as scalable) solution than the work by Toshio Endo
  986. et al, at the University of Tokyo. A number of their ideas were
  987. reused, though the code wasn't, and the underlying data structure
  988. is significantly different. In particular, we keep the global mark
  989. stack as a single shared data structure, but most of the work is done
  990. on smaller thread-local mark stacks.
  991. - Changed GC_malloc_many to be cheaper, and to require less mutual exclusion
  992. with -DPARALLEL_MARK.
  993. - Added full support for thread local allocation under Linux
  994. (-DTHREAD_LOCAL_ALLOC). This is a thin veneer on GC_malloc_many, and
  995. should be easily portable to other platforms, especially those that
  996. support pthreads.
  997. - CLEAR_DOUBLE was not always getting invoked when it should have been.
  998. - GC_gcj_malloc and friends used different out of memory handling than
  999. everything else, probably because I forgot about one when I implemented
  1000. the other. They now both call GC_oom_fn(), not GC_oom_action().
  1001. - Integrated Jakub Jelinek's fixes for Linux/SPARC.
  1002. - Moved GC_objfreelist, GC_aobjfreelist, and GC_words_allocd out of
  1003. GC_arrays, and separately registered the first two as excluded roots.
  1004. This makes code compiled with gc_inl.h less dependent on the
  1005. collector version. (It would be nice to remove the inclusion of
  1006. gc_priv.h by gc_inl.h completely, but we're not there yet. The
  1007. locking definitions in gc_priv.h are still referenced.)
  1008. This change was later coniditoned on SEPARATE_GLOBALS, which
  1009. is not defined by default, since it involves a performance hit.
  1010. - Register GC_obj_kinds separately as an excluded root region. The
  1011. attempt to register it with GC_arrays was usually failing. (This wasn't
  1012. serious, but seemed to generate some confusion.)
  1013. - Moved backptr.h to gc_backptr.h.
  1014. Since 6.0alpha1
  1015. - Added USE_MARK_BYTES to reduce the need for compare-and-swap on platforms
  1016. for which that's expensive.
  1017. - Fixed a locking bug ib GC_gcj_malloc and some locking assertion problems.
  1018. - Added a missing volatile to OR_WORD and renamed the parameter to
  1019. GC_compare_and_swap so it's not a C++ reserved word. (Thanks to
  1020. Toshio Endo for pointing out both of those.)
  1021. - Changed Linux dynamic library registration code to look at /proc/self/maps
  1022. instead of the rld data structures when REDIRECT_MALLOC is defined.
  1023. Otherwise some of the rld data data structures may be prematurely garbage
  1024. collected. (Thanks to Eric Benson for helping to track this down.)
  1025. - Fixed USE_LD_WRAP a bit more, so it should now work without threads.
  1026. - Renamed XXX_THREADS macros to GC_XXX_THREADS for namespace correctness.
  1027. Tomporarily added some backward compatibility definitions. Renamed
  1028. USE_LD_WRAP to GC_USE_LD_WRAP.
  1029. - Many MACOSX POWERPC changes, some additions to the gctest output, and
  1030. a few minor generic bug fixes. (Thanks to Dietmar Planitzer.)
  1031. Since 6.0 alpha2
  1032. - Fixed the /proc/self/maps code to not seek, since that apparently is not
  1033. reliable across all interesting kernels.
  1034. - Fixed some compilation problems in the absence of PARALLEL_MARK
  1035. (introduced in alpha2).
  1036. - Fixed an algorithmic problem with PARALLEL_MARK. If work needs to
  1037. be given back to the main mark "stack", the BOTTOM entries of the local
  1038. stack should be given away, not the top ones. This has substantial
  1039. performance impact, especially for > 2 processors, from what I can tell.
  1040. - Extracted gc_lock.h from gc_priv.h. This should eventually make it a
  1041. bit easier to avoid including gc_priv.h in clients.
  1042. - Moved all include files to include/ and removed duplicate links to the
  1043. same file. The old scheme was a bad idea because it was too easy to get the
  1044. copies out of sync, and many systems don't support hard links.
  1045. Unfortunately, it's likely that I broke some of the non-Unix Makefiles in
  1046. the process, although I tried to update them appropriately.
  1047. - Removed the partial support for a copied nursery. It's not clear that
  1048. this would be a tremendous win, since we don't consistently lose to
  1049. generational copying collectors. And it would significantly complicate
  1050. many things. May be reintroduced if/when it really turns out to win.
  1051. - Removed references to IRIX_JDK_THREADS, since I believe there never
  1052. were and never will be any clients.
  1053. - Added some code to linux_threads.c to possibly support HPUX threads
  1054. using the Linux code. Unfortunately, it doesn't work yet, and is
  1055. currently disabled.
  1056. - Added support under Linux/X86 for saving the call chain, both in (debug)
  1057. objects for client debugging, and in GC_arrays._last_stack for GC
  1058. debugging. This was previously supported only under Solaris. It is
  1059. not enabled by default under X86, since it requires that code be compiled
  1060. to explicitly dave frame pointers on the call stack. (With gcc this
  1061. currently happens by default, but is often turned off explicitly.)
  1062. To turn it on, define SAVE_CALL_CHAIN.
  1063. Since 6.0 alpha3
  1064. - Moved up the detection of mostly full blocks to the initiatiation of the
  1065. sweep phase. This eliminates some lock conention in the PARALLEL_MARK case,
  1066. as multiple threads try to look at mostly full blocks concurrently.
  1067. - Restored the code in GC_malloc_many that grabs a prefix of the global
  1068. free list. This avoids the case in which every GC_malloc_many call
  1069. tries and fails to allocate a new heap block, and the returns a single
  1070. object from the global free list.
  1071. - Some minor fixes in new_hblk.c. (Attempted to build free lists in order
  1072. of increasing addresses instead of decreasing addresses for cache performance
  1073. reasons. But this seems to be only a very minor gain with -DEAGER_SWEEP,
  1074. and a loss in other cases. So the change was backed out.)
  1075. - Fixed some of the documentation. (Thanks in large part to Fergus
  1076. Henderson.)
  1077. - Fixed the Linux USE_PROC_FOR_LIBRARIES code to deal with apps that perform
  1078. large numbers of mmaps. (Thanks to Eric Benson.) Also fixed that code to
  1079. deal with short reads.
  1080. - Added GC_get_total_bytes().
  1081. - Fixed leak detection mode to avoid spurious messages under linuxthreads.
  1082. (This should also now be easy for the other supported threads packages.
  1083. But the code is tricky enough that I'm hesitant to do it without being able
  1084. to test. Everything allocated in the GC thread support itself should be
  1085. explicitly deallocated.)
  1086. - Made it possible (with luck) to redirect malloc to GC_local_malloc.
  1087. Since 6.0 alpha4
  1088. - Changed the definition of GC_pause in linux_threads.c to use a volatile
  1089. asm. Some versions of gcc apparently optimize away writes to local volatile
  1090. variables. This caused poor locking behaviour starting at about
  1091. 4 processors.
  1092. - Added GC_start_blocking(), GC_end_blocking() calls and wrapper for sleep
  1093. to linux_threads.c.
  1094. The first two calls could be used to generally avoid sending GC signals to
  1095. blocked threads, avoiding both premature wakeups and unnecessary overhead.
  1096. - Fixed a serious bug in thread-local allocation. At thread termination,
  1097. GC_free could get called on small integers. Changed the code for thread
  1098. termination to more efficiently return left-over free-lists.
  1099. - Integrated Kjetil Matheussen's BeOS support.
  1100. - Rearranged the directory structure to create the doc and tests
  1101. subdirectories.
  1102. - Sort of integrated Eric Benson's patch for OSF1. This provided basic
  1103. OSF1 thread support by suitably extending hpux_irix_threads.c. Based
  1104. on earlier email conversations with David Butenhof, I suspect that it
  1105. will be more reliable in the long run to base this on linux_threads.c
  1106. instead. Thus I attempted to patch up linux_threads.c based on Eric's code.
  1107. The result is almost certainly broken, but hopefully close enough that
  1108. someone with access to a machine can pick it up.
  1109. - Integrated lots of minor changes from the NetBSD distribution. (These
  1110. were supplied by David Brownlee. I'm not sure about the original
  1111. authors.)
  1112. - Hacked a bit more on the HP/UX thread-support in linux_threads.c. It
  1113. now appears to work in the absence of incremental collection. Renamed
  1114. hpux_irix_threads.c back to irix_threads.c, and removed the attempt to
  1115. support HPUX there.
  1116. - Changed gc.h to define _REENTRANT in cases in which it should already
  1117. have been defined. It is still safer to also define it on the command
  1118. line.
  1119. Since 6.0alpha5:
  1120. - Changed the definition of DATASTART on ALPHA and IA64, where data_start
  1121. and __data_start are not defined by earlier versions of glibc. This might
  1122. need to be fixed on other platforms as well.
  1123. - Changed the way the stack base and backing store base are found on IA64.
  1124. This should now remain reliable on future kernels. But since it relies
  1125. on /proc, it will no longer work in the simulated NUE environment.
  1126. - Made the call to random() in dbg_mlc.c with -DKEEP_BACK_PTRS dependent
  1127. on the OS. On non-Unix systems, rand() should be used instead. Handled
  1128. small RAND_MAX. (Thanks to Peter Ross for pointing this out.)
  1129. - Fixed the cord make rules to create the cord subdirectory, if necessary.
  1130. (Thanks to Doug Moen.)
  1131. - Changed fo_object_size calculation in finalize.c. Turned finalization
  1132. of nonheap object into a no-op. Removed anachronism from GC_size()
  1133. implementation.
  1134. - Changed GC_push_dirty call in solaris_threads.c to GC_push_selected.
  1135. It was missed in a previous renaming. (Thanks to Vladimir Tsichevski
  1136. for pointing this out.)
  1137. - Arranged to not not mask SIGABRT in linux_threads.c. (Thanks to Bryce
  1138. McKinlay.)
  1139. - Added GC_no_dls hook for applications that want to register their own
  1140. roots.
  1141. - Integrated Kjetil Matheussen's Amiga changes.
  1142. - Added FREEBSD_STACKBOTTOM. Changed the X86/FreeBSD port to use it.
  1143. (Thanks to Matthew Flatt.)
  1144. - Added pthread_detach interception for platforms supported by linux_threads.c
  1145. and irix_threads.c. Should also be added for Solaris?
  1146. - Changed the USE_MMAP code to check for the case in which we got the
  1147. high end of the address space, i.e. mem_ptr + mem_sz == 0. It appears
  1148. that this can happen under Solaris 7. It seems to be allowed by what
  1149. I would claim is an oversight in the mmap specification. (Thanks to Toshio
  1150. Endo for pointing out the problem.)
  1151. - Cleanup of linux_threads.c. Some code was originally cloned from
  1152. irix_threads.c and now unnecessary. Some comments were obviously wrong.
  1153. - (Mostly) fixed a longstanding problem with setting of dirty bits from
  1154. a signal handler. In the presence of threads, dirty bits could get lost,
  1155. since the etting of a bit in the bit vector was not atomic with respect
  1156. to other updates. The fix is 100% correct only for platforms for which
  1157. GC_test_and_set is defined. The goal is to make that all platforms with
  1158. thread support. Matters only if incremental GC and threads are both
  1159. enabled.
  1160. - made GC_all_interior_pointers (a.k.a. ALL_INTERIOR_POINTERS) an
  1161. initialization time, instead of build-time option. This is a
  1162. nontrivial, high risk change. It should slow down the code measurably
  1163. only if MERGE_SIZES is not defined, which is a very nonstandard
  1164. configuration.
  1165. - Added doc/README.environment, and implemented what it describes. This
  1166. allows a number of additional configuration options to be set through
  1167. the environment. It documents a few previously undocumented options.
  1168. - Integrated Eric Benson's leak testing improvements.
  1169. - Removed the option to throw away the beginning of each page (DISCARD_WORDS).
  1170. This became less and less useful as processors enforce stricter alignment.
  1171. And it hadn't been tested in ages, and was thus probably broken anyway.
  1172. Since 6.0alpha6:
  1173. - Added GC_finalizer_notifier. Fixed GC_finalize_on_demand. (The variable
  1174. actually wasn't being tested at the right points. The build-time flag
  1175. was.)
  1176. - Added Tom Tromey's S390 Linux patch.
  1177. - Added code to push GC_finalize_now in GC_push_finalizer_structures.
  1178. (Thanks to Matthew Flatt.)
  1179. - Added GC_push_gc_structures() to push all GC internal roots.
  1180. - Integrated some FreeBSD changes from Matthew Flatt.
  1181. - It looks like USRSTACK is not always correctly defined under Solaris.
  1182. Hacked gcconfig.h to attempt to work around the problem. The result
  1183. is not well tested. (Thanks again to Matthew Flatt for pointing this
  1184. out. The gross hack is mine. - HB)
  1185. - Added Ji-Yong Chung's win32 threads and C++ fixes.
  1186. - Arranged for hpux_test_and_clear.s to no longer be needed or built.
  1187. It was causing build problems with gas, and it's not clear this is
  1188. better than the pthreads alternative on this platform.
  1189. - Some MINGW32 fixes from Hubert Garavel.
  1190. - Added Initial Hitachi SH4 port from Kaz Kojima.
  1191. - Ported thread-local allocation and parallel mark code to HP/UX on PA_RISC.
  1192. - Made include/gc_mark.h more public and separated out the really private
  1193. pieces. This is probably still not quite sufficient for clients that
  1194. want to supply their own kind of type information. But it's a start.
  1195. This involved lots of identifier renaming to make it namespace clean.
  1196. - Added GC_dont_precollect for clients that need complete control over
  1197. the root set.
  1198. - GC_is_visible didn't do the right thing with gcj objects. (Not that
  1199. many people are likely to care, but ...)
  1200. - Don't redefine read with GC_USE_LD_WRAP.
  1201. - Initial port to LINUX/HP_PA. Incremental collection and threads are not
  1202. yet supported. (Incremental collection should work if you have the
  1203. right kernel. Threads may work with a sufficiently patched pthread
  1204. library.)
  1205. - Changed gcconfig.h to recognize __i386__ as an alternative to i386 in
  1206. many places. (Thanks to Benjamin Lerman.)
  1207. - Made win32_threads.c more tolerant of detaching a thread that it didn't
  1208. know about. (Thanks to Paul Nash.)
  1209. - Added Makefile.am and configure.in from gcc to the distribution, with
  1210. minimal changes. For the moment, those are just placeholders. In the
  1211. future, we're planning to switch to a GNU-style build environment for
  1212. Un*x-like systems, though the old Makefile will remain as a backup.
  1213. - Turned off STUBBORN_ALLOC by default, and added it back as a Makefile
  1214. option.
  1215. - Redistributed some functions between malloc.c and mallocx.c, so that
  1216. simple statically linked apps no longer pull in mallocx.o.
  1217. - Changed large object allocation to clear the first and last few words
  1218. of each block before releassing the lock. Otherwise the marker could see
  1219. objects with nonsensical type descriptors.
  1220. - Fixed a couple of subtle problems that could result in not recognizing
  1221. interior pointers from the stack. (I believe these were introduced
  1222. in 6.0alpha6.)
  1223. - GC_debug_free_inner called GC_free, which tried to reacquire the
  1224. allocator lock, and hence deadlocked. (DBG_HDRS_ALL probably never worked
  1225. with threads?)
  1226. - Fixed several problems with back traces. Accidental references to a free
  1227. list could cause the free list pointer to be overwritten by a back pointer.
  1228. There seemed to be some problems with the encoding of root and finalizer
  1229. references.
  1230. Since 6.0alpha7:
  1231. - Changed GC_debug_malloc_replacement and GC_debug_realloc_replacement
  1232. so that they compile under Irix. (Thanks to Dave Love.)
  1233. - Updated powerpc_macosx_mach_dep.s so that it works if the collector
  1234. is in a dynamic library. (Thanks to Andrew Begel.)
  1235. - Transformed README.debugging into debugging.html, updating and
  1236. expanding it in the process. Added gcdescr.html and tree.html
  1237. from the web site to the GC distribution.
  1238. - Fixed several problems related to PRINT_BLACK_LIST. This involved
  1239. restructuring some of the marker macros.
  1240. - Fixed some problems with the sizing of objects with debug information.
  1241. Finalization was broken KEEP_BACK_PTRS or PRINT_BLACK_LIST. Reduced the
  1242. object size with SHORT_DEBUG_HDRS by another word.
  1243. - The "Needed to allocate blacklisted ..." warning had inadvertently
  1244. been turned off by default, due to a buggy test in allchblk.c. Turned
  1245. it back on.
  1246. - Removed the marker macros to deal with 2 pointers in interleaved fashion.
  1247. They were messy and the performance improvement seemed minimal. We'll
  1248. leave such scheduling issues to the compiler.
  1249. - Changed Linux/PowerPC test to also check for __powerpc__ in response
  1250. to a discussion on the gcc mailing list.
  1251. - On Matthew Flatt's suggestion removed the "static" from the jmp_buf
  1252. declaration in GC_generic_push_regs. This was causing problems in
  1253. systems that register all of their own roots. It looks far more correct
  1254. to me without the "static" anyway.
  1255. - Fixed several problems with thread local allocation of pointerfree or
  1256. typed objects. The collector was reclaiming thread-local free lists, since
  1257. it wasn't following the link fields.
  1258. - There was apparently a long-standing race condition related to multithreaded
  1259. incremental collection. A collection could be started and a thread stopped
  1260. between the memory unprotect system call and the setting of the
  1261. corresponding dirt bit. I believe this did not affect Solaris or PCR, which
  1262. use a different dirty-bit implementation. Fixed this by installing
  1263. signal handlers with sigaction instead of signal, and disabling the thread
  1264. suspend signal while in the write-protect handler. (It is unclear
  1265. whether this scenario ever actually occurred. I found it while tracking
  1266. down the following:)
  1267. - Incremental collection did not cooperate correctly with the PARALLEL_MARK
  1268. implementation of GC_malloc_many or the local_malloc primitves. It still
  1269. doesn't work well, but it shouldn't lose memory anymore.
  1270. - Integrated some changes from the gcc source tree that I had previously
  1271. missed. (Thanks to Bryce McKinley for the reminder/diff.)
  1272. - Added Makefile.direct as a copy of the default Makefile, which would
  1273. normally be overwritten if configure is run.
  1274. - Changed the gc.tar target in Makefile.direct to embed the version number
  1275. in the gc directory name. This will affect future tar file distributions.
  1276. - Changed the Irix dynamic library finding code to no longer try to
  1277. eliminate writable text segments under Irix6.x, since that is probably no
  1278. longer necessary, and can apparently be unsafe on occasion. (Thanks to
  1279. Shiro Kawai for pointing this out.)
  1280. - GC_cleanup with GC_DEBUG enabled passed a real object base address to
  1281. GC_debug_register_finalizer_ignore_self, which expected a pointer past the
  1282. debug header. Call GC_register_finalizer_ignore_self instead, even with
  1283. debugging enabled. (Thanks to Jean-Daniel Fekete for catching this.)
  1284. - The collector didn't build with call chain saving enabled but NARGS=0.
  1285. (Thanks to Maarten Thibaut.)
  1286. - Fixed up the GNU-style build files enough so that they work in some
  1287. obvious cases.
  1288. - Added initial port to Digital Mars compiler for win32. (Thanks to Walter
  1289. Bright.)
  1290. Since 6.0alpha8:
  1291. - added README.macros.
  1292. - Made gc.mak a symbolic link to work around winzip's tendency to ignore
  1293. hard links.
  1294. - Simplified the setting of NEED_FIND_LIMIT in os_dep.c, possibly breaking
  1295. it on untested platforms.
  1296. - Integrated initial GNU HURD port. (Thanks to Chris Lingard and Igor
  1297. Khavkine.)
  1298. - A few more fixes for Digital Mars compiler (Walter Bright).
  1299. - Fixed gcc version recognition. Renamed OPERATOR_NEW_ARRAY to
  1300. GC_OPERATOR_NEW_ARRAY. Changed GC_OPERATOR_NEW_ARRAY to be the default.
  1301. It can be overridden with -DGC_NO_OPERATOR_NEW_ARRAY. (Thanks to
  1302. Cesar Eduardo Barros.)
  1303. - Changed the byte size to free-list mapping in thread local allocation
  1304. so that size 0 allocations are handled correctly.
  1305. - Fixed Linux/MIPS stackbottom for new toolchain. (Thanks to Ryan Murray.)
  1306. - Changed finalization registration to invoke GC_oom_fn when it runs out
  1307. of memory.
  1308. - Removed lvalue cast in finalize.c. This caused some debug configurations
  1309. not to build with some non-gcc compilers.
  1310. Since 6.0alpha9:
  1311. - Two more bug fixes for KEEP_BACK_PTRS and DBG_HDRS_ALL.
  1312. - Fixed a stack clearing problem that resulted in SIGILL with a
  1313. misaligned stack pointer for multithreaded SPARC builds.
  1314. - Integrated another HURD patch (thanks to Igor Khavkine).
  1315. Since 6.0:
  1316. - Non-debug, atomic allocations could result in bogus smashed object
  1317. reports with debugging on. (Thanks to Patrick Doyle for the small
  1318. test case.)
  1319. - Fixed GC_get_register_stack_base (Itanium only) to work around a glibc
  1320. 2.2.4 bug.
  1321. - Initial port to HP/UX on Itanium. Thread support and both 32 and 64
  1322. bit ABIs appear to work. Parallel mark support doesn't yet, due to
  1323. some inline assembly code issues. Thread local allocation does appear
  1324. to work.
  1325. - ifdef'ed out glibc2.1/Itanium workaround. I suspect nobody is using
  1326. that combination anymore.
  1327. - Added a patch to make new_gc_alloc.h usable with gcc3.0. (Thanks to
  1328. Dimitris Vyzovitis for the patch.)
  1329. - Debugged 64-bit support on HP/UX PA-RISC.
  1330. - Turned on dynamic loading support for FreeBSD/ELF. (Thanks to Peter
  1331. Housel.)
  1332. - Unregistering of finalizers with debugging allocation was broken.
  1333. (Thanks to Jani Kajala for the test case.)
  1334. - Old finalizers were not returned correctly from GC_debug_register_finalizer.
  1335. - Disabled MPROTECT_VDB for Linux/M68K based on a report that it doesn't work.
  1336. - Cleaned up some statistics gathering code in reclaim.c (Thanks to Walter
  1337. Bright.)
  1338. - Added some support for OpenBSD/ELF/Linux. (Thanks to Suzuki Toshiya.)
  1339. - Added Jakub Jelinek's patch to use dl_iterate_phdr for dynamic library
  1340. traversal to dyn_load.c. Changed it to weakly reference dl_iterate_phdr,
  1341. so that the old code is stilll used with old versions of glibc.
  1342. - Cleaned up feature test macros for various threads packages and
  1343. integrated (partially functional) FreeBSD threads code from Loren Rittle.
  1344. It's likely that the cleanup broke something, since it touched lots of
  1345. code. It's also likelly that it fixed some unreported bugs in the
  1346. less common thread implementations, since some of the original code
  1347. didn't stand up to close scrutiny. Support for the next pthreads
  1348. implementation should be easier to add.
  1349. Since 6.1alpha1:
  1350. - No longer wrap read by default in multithreaded applications. It was
  1351. pointed out on the libgcj list that this holds the allocation lock for
  1352. way too long if the read blocks. For now, reads into the heap are
  1353. broken with incremental collection. It's possible to turn this back on
  1354. if you make sure that read calls don't block (e.g. by calling select
  1355. first).
  1356. - Fix ifdef in Solaris_threads.h to refer to GC_SOLARIS_THREADS.
  1357. - Added check for environment variable GC_IGNORE_GCJ_INFO.
  1358. - Added printing of stop-the-world GC times if GC_PRINT_STATS environment
  1359. variable is set.
  1360. - The calloc definition in leak_detector.h was missing parentheses, and
  1361. realloc was missing a second argument to GC_REALLOC.
  1362. (Thanks to Elrond (elrond<at>samba-tng.org).)
  1363. - Added GC_PRINT_BACK_HEIGHT environment variable and associated
  1364. code, mostly in the new file backgraph.c. See doc/README.environment.
  1365. - Added -DUSE_GLOBAL_ALLOC to work around a Windows NT issue. (Thanks to
  1366. Jonathan Clark.)
  1367. - Integrated port to NEC EWS4800 (MIPS-based workstation, with somewhat
  1368. different address-space layout). This may help for other machines with
  1369. holes in the data segment. (Thanks to Hironori Sakamoto.)
  1370. - Changed the order in which GC_push_roots and friends push things onto
  1371. the mark stack. GC_push_all calls need to come first, since we can't
  1372. necessarily recovere if those overflow the mark stack. (Thanks to
  1373. Matthew Flatt for tracking down the problem.)
  1374. - Some minor cleanups to mostly support the Intel compiler on Linux/IA64.
  1375. Since 6.1 alpha2:
  1376. - Minor cleanup on the gcconfig.h section for SPARC.
  1377. - Minor fix to support Intel compiler for I386/Linux. (Thanks to Sven
  1378. Hartrumpf.)
  1379. - Added SPARC V9 (64-bit) support. (Thanks to Jeff Sturm.)
  1380. - Restructured the way in which we determine whether or not to keep
  1381. call stacks for debug allocation. By default SAVE_CALL_COUNT is
  1382. now zero on all platforms. Added SAVE_CALL_NARGS parameters.
  1383. If possible, use execinfo.h to capture call stack. (This should
  1384. add support for a number of new platforms, though often at
  1385. considerable runtime expense.)
  1386. - Try to print symbolic information for call stacks. On Linux, we
  1387. do this with a combination of execinfo.h and running addr2line in
  1388. a separate process. This is both much more expensive and much more
  1389. useful. Amazingly, it seems to be fast enough for most purposes.
  1390. - Redefined strdup if -DREDIRECT_MALLOC is given.
  1391. - Changed incremental collector and MPROTECT_VDB implementation so that,
  1392. under favorable conditions, pointerfree objects are not protected.
  1393. Added GC_incremental_protection_needs() to determine ahead of time whether
  1394. pointerfree objects may be protected. Replaced GC_write_hint() with
  1395. GC_remove_protection().
  1396. - Added test for GC_ENABLE_INCREMENTAL environment variable.
  1397. - Made GC_time_limit runtime configurable. Added GC_PAUSE_TIME_TARGET
  1398. environment variable.
  1399. - Eliminated GC_page_sz, a duplicate of GC_page_size.
  1400. - Caused the Solaris and Irix thread creation primitives to call
  1401. GC_init_inner().
  1402. Since 6.1alpha3:
  1403. - Fixed typo in sparc_mach_dep.S, preventing the 64-bit version from
  1404. building. Increased 64-bit heap size limit in test.c slightly, since
  1405. a functional SPARC collector seems to slightly exceed the old limits.
  1406. (Thanks again to Jeff Sturm.)
  1407. - Use NPRGREG in solaris_threads.c, thus printing all registers if things
  1408. go wrong.
  1409. - Added GC_MARKERS environment variable to allow use of a single marker
  1410. thread on an MP without confusing the lock implementation.
  1411. - Collect much less aggressively in incremental mode with GC_TIME_UNLIMITED.
  1412. This is really a purely generational mode, and we can afford to
  1413. postpone the collection until the heap is (nearly) full.
  1414. - Remove read() wrapper for MPROTECT_VDB. It was causing more harm than
  1415. good. It is often no longer needed if system calls avoid writing to
  1416. pointerfull heap objects.
  1417. - Fix MACOSX test in gcconfig.h. (Thanks to John Clements.)
  1418. - Change GC_test_and_set so that it consistently has one argument.
  1419. Add spaces to ::: in powerpc assembly code in gc_locks.h.
  1420. (Thanks to Ryan Murray.)
  1421. - Fixed a formatting error in dbg_mlc.c. Added prototype to GC_abort()
  1422. declaration. (Thanks to Michael Smith.)
  1423. - Removed "source" argument to GC_find_start(). Eliminate GC_FIND_START().
  1424. - Added win32 recognition code in configure.in. Changed some of the
  1425. dllimport/export defines in gc.h. (Thanks to Adam Megacz.)
  1426. - GC_malloc_many didn't set hb_last_reclaimed when it called
  1427. GC_reclaim_generic. (I'm not sure this matters much, but ...)
  1428. - Allocating uncollectable objects with debug information sometimes
  1429. allocated objects that were one byte too small, since uncollectable
  1430. objects don't have the extra byte added at the end. (Thanks to
  1431. Wink Saville for pointing this out.)
  1432. - Added a bit more assertion checking to make sure that gcj objects
  1433. on free lists never have a nonzero second word.
  1434. - Replaced BCC_MAKEFILE with an up-to-date one. (Thanks to
  1435. Andre Leiradella.)
  1436. - Upgraded libtool, cinfigure.in and some related files to hopefully
  1437. support NetBSD/SPARC. (Thanks to Adrian Bunk.) Unfortunately,
  1438. libtool 1.4.2 seemed to be buggy due to missing quotes in several
  1439. "test" invocations. Fixed those in the ltmain.sh script.
  1440. - Some win32-specific patches, including the introduction of
  1441. GC_CreateThread. (Thanks to Adam Megacz.)
  1442. - Merged in gcj changes from Anthony Green to support embedded systems.
  1443. - Tried to consistently rename preprocessed assembly files with a capital
  1444. .S extension.
  1445. - Use alpha_mach_dep.S on ALPHA again. It doesn't really matter, but this
  1446. makes our distribution consistent with the gcc one, avoiding future merge
  1447. problems.
  1448. - Move GET_MEM definition into gcconfig.h. Include gcconfig.h slightly
  1449. later in gc_priv.h to avoid forward references to ptr_t.
  1450. - Add some testing of local allocation to test.c.
  1451. - Change definition of INVALID_QTID in specific.h. The -1 value was used
  1452. inconsistently, and too likely to collide with a valid stack address.
  1453. Some general clean-up of specific.[ch]. Added assertions. (Thanks
  1454. to Michael Smith for tracking down an intermittent bug to this
  1455. general area. I'm not sure it has been squashed yet, however.)
  1456. - On Pthread systems it was not safe to call GC_malloc() between fork()
  1457. and exec(). According to the applicable standards, it doesn't appear
  1458. to be safe to call malloc() or many other libc functions either, thus
  1459. it's not clear this is fixable. Added experimental support for
  1460. -DHANDLE_FORK in linux_threads.c which tries to support it. It may
  1461. succeed if libc does the right thing. I'm not sure whether it does.
  1462. (Thanks to Kenneth Schalk for pointing out this issue.)
  1463. - Documented thread local allocation primitives to require an
  1464. explicit GC_init call. GC_init_parallel is no longer declared to
  1465. be a constructor function, since that isn't portable and often
  1466. seems to lead to initialization order problems.
  1467. - Changed gc_cpp.cc and gc_cpp.h in one more attempt to make them
  1468. compatible with Visual C++ 6. (Thanks to Wink Saville for the
  1469. patch.)
  1470. - Some more patches for Linux on HP PA-RISC.
  1471. - Added include/gc_allocator.h. It implements (hopefully) standard
  1472. conforming (as opposed to SGI-style) allocators that allocate
  1473. collectable (gc_allocator) or GC-traceable, but not collectable
  1474. (traceable_allocator) objects. This borrows heavily from libstc++,
  1475. which borrows heavily from the SGI implementation, this part of
  1476. which was written by Matt Austern. Changed test_cpp.cc to very
  1477. minimally test this.
  1478. - On Linux/X86, retry mmap with a different start argument. That should
  1479. allow the collector to use more (closer to 3GB) of the address space.
  1480. (Thanks to Jeffrey Mark Siskind for tracking this down.)
  1481. - Force 64 bit alignment with GCJ support. (Reflects Bryce McKinley's
  1482. patch to the gcc tree.)
  1483. - Refined the choice of sa_handler vs. sa_sigaction in GC_dirty_init
  1484. to accomodate some glibc5 systems. (Thanks to Dan Fandrich for the
  1485. patch.)
  1486. - Compensated for the fact that current versions of glibc set
  1487. __libc_stack_end incorrectly on Linux/IA64 while initialization code
  1488. is running. This could cause the collector to miss 16 bytes of
  1489. the memory stack if GC_malloc or friends where called before main().
  1490. - Mostly integrated Takis Psarogiannakopoulos' port to DG/UX Inix 86.
  1491. This will probably take another iteration to work, since his
  1492. patch conflicted with the libtool upgrade.
  1493. - Added README.arm.cross containing some information about cross-
  1494. compiling to an ARM processor from Margaret Fleck.
  1495. Since 6.1alpha4:
  1496. - Added GC_finalizer_mem_freed, and changed some of the code that
  1497. decided on heap expansion to look at it. Memory explicitly
  1498. deallocated by finalizers essentially needs to be counted as reclaimed
  1499. by the GC. Otherwise there are cases in which the heap can grow
  1500. unboundedly. (Thanks to Mark Reichert for the test case.)
  1501. - Integrated Adam Megacz patches to not scan dynamic libraries if
  1502. we are compiling with gcc on win32. Otherwise we need structured
  1503. exception handling to deal with asynchronously unmapped root
  1504. segments, and gcc doesn't directly support that.
  1505. - Integrated Anthony Green's patch to support Wine.
  1506. - GC_OPERATOR_NEW_ARRAY was misspelled OPERATOR_NEW_ARRAY in several
  1507. places, including gc_cpp.cc. (Thanks to Wink Saville for pointing
  1508. this out.)
  1509. - Integrated Loren James Rittle's Alpha FreeBSD patches. In
  1510. response to Richard Henderson's suggestion, these also
  1511. changed the declarations of symbols like _end on many platforms to
  1512. that they wouldn't mistakenly be declared as short data symbols.
  1513. - Integrated changes from the Debian distribution. (Thanks to Ryan Murray
  1514. for pointing these out.) Fix C++ comments in POWERPC port. Add ARM32
  1515. incremental GC support. Get rid of USE_GENERIC_PUSH_REGS for alpha/Linux,
  1516. this time for real. Use va_copy to get rid of cord printf problems
  1517. (finally).
  1518. - Close file descriptor used to count cpus. Thanks to Jeff Sturm for
  1519. pointing out the omission.
  1520. - Don't just drop gcj free lists in GC_start_reclaim, since that can
  1521. eventually cause the marker to see a bogus mark descriptor in the
  1522. dropped objects. The usual symptom was a very intermittent segmentation
  1523. fault in the marker. This mattered only if one of the GC_gcj_malloc
  1524. variants was used. (Thanks to Michael Smith, Jeff Sturm, Bryce
  1525. McKinley and Tom Tromey for helping to track this down.)
  1526. - Fixed Linux and Solaris/64 SPARC configuration. (Thanks to David Miller,
  1527. Jeff Sturm, Tom Tromey, and Christian Joensson.)
  1528. - Fixed a typo in strdup definition. (Thanks to Gerard A Allan.)
  1529. - Changed Makefile.direct to invoke $(CC) to assemble alpha_mach_dep.S.
  1530. This is needed on Linux. I'm not sure whether it's better or worse
  1531. on Tru64.
  1532. - Changed gc_cpp.h once more to declare operator new and friends only in
  1533. a Microsoft environment. This may need further fine tuning. (Thanks to
  1534. Johannes Schmidt for pointing out that the older code breaks on gcc3.0.4.)
  1535. - Don't ever override strdup if it's already macro defined. (Thanks to
  1536. Adnan Ali for pointing out the problem.)
  1537. - Changed gc_cpp.h yet again to also overload placement new. Due to the
  1538. C++ overloading rules, the other overloaded new operations otherwise hide
  1539. placement new, which causes many STL uses to break. (Thanks to Reza
  1540. Shahidi for reporting this, and to Matt Austern for proposing a fix.)
  1541. - Integrated cygwin pthreads support from Dan Bonachea.
  1542. - Turn on DYNAMIC_LOADING for NetBSD. (Thanks to Krister Walfridsson.)
  1543. - Changed printing code to print more complete GC times.
  1544. - Applied Mark Mitchell's Irix patch to correct some bitrot.
  1545. - Clarified which object-printing routines in dbg_mlc.c should hold
  1546. the allocation lock. Restructured the code to allow reasonable object
  1547. printing with -DREDIRECT_MALLOC.
  1548. - Fix the Linux mmap code to always start with 0x1000 as the initial hint.
  1549. Minor patches for 64-bit AIX, particularly to STACKBOTTOM.
  1550. (Thanks again to Jeffrey Mark Siskind.)
  1551. - Renamed "SUSPENDED" flag for Solaris threads support to avoid a conflict
  1552. with a system header. (Thanks to Philp Brown.)
  1553. - Cause win32_threads.c to handle an out of range stack pointer correctly,
  1554. though currently with a warning. (Thanks to Jonathan Clark for
  1555. observing that win32 applications may temporarily use the stack
  1556. pointer for other purposes, and suggesting a fix. Unfortunately, it's
  1557. not clear that there is a complete solution to this problem.)
  1558. Since 6.1alpha5:
  1559. - Added GC_MAXIMUM_HEAP_SIZE environment variable.
  1560. - Fix configure.in for MIPS/LINUX. (Thanks to H.J. Lu.)
  1561. - Double page hash table size for -DLARGE_CONFIG.
  1562. - Integrated Bo Thorsen's X86-64 support.
  1563. - STACKBOTTOM definition for LINUX/MIPS was partially changed back.
  1564. (Thanks to H.J. Lu and Hiroshi Kawashima for resolving this.)
  1565. - Replaced all occurrences of LINUX_DATA_START in gcconfig.h with
  1566. SEARCH_FOR_DATA_START. It doesn't hurt to falll back to a search.
  1567. And __data_start doesn't seem to get defined correctly of the GC
  1568. library is loaded with LD_PRELOAD, e.g. for leak detection.
  1569. - If the GC_find_leak environment variable is set, do a
  1570. atexit(GC_gcollect) to give us at least one chance to detect leaks.
  1571. This may report some very benign leaks, but ...
  1572. - Addeded REDIRECT_FREE. It's necessary if we want leak detection with
  1573. LD_PRELOAD.
  1574. - Defer printing of leaked objects, as for smashed objects.
  1575. - Fixed process and descriptor leak in GC_print_callers. Try for
  1576. line number even if we got function name.)
  1577. - Ported parallel GC support and thread local allocation to Alpha.
  1578. Not yet well-tested.
  1579. - Added GC_DUMP_REGULARLY and added finalization statistics to GC_dump().
  1580. - Fixed Makefile.am to mention alpha_mach_dep.S instead of the defunct
  1581. alpha_mach_dep.s. (Thanks to Fergus Henderson.)
  1582. - Incorporated a change to new_gc_alloc.h, suggested by Johannes Schmidt,
  1583. which should make it work with gcc3.1. (I would still like to encourage
  1584. use of gc_allocator.h instead.)
  1585. - Use alpha_mach_dep.S only on Linux. (It's not clear that this is
  1586. optimal, but it otherwise didn't build on Tru64. Thanks to Fergus
  1587. Henderson.)
  1588. - Added ifdef to guard free() in os_dep.c. Otherwise we get a
  1589. compilation error on Irix. (Thanks to Dai Sato.)
  1590. - Added an experimental version of GC_memalign to mallocx.c. This can't
  1591. always work, since we don't handle alignment requests in the hblk-level
  1592. allocator, and we can't handle arbitrary pointer displacements unless
  1593. GC_all_interior_pointers is enabled. But it should work for alignment
  1594. requests up to HBLKSIZE. This is not yet documented in the standard
  1595. places.
  1596. - Finally debugged the OSF1/Tru64 thread support. This needs more testing,
  1597. since I needed to add a somewhat unconvincing workaround for signal
  1598. delivery issues that I don't yet completely understand. But it does
  1599. pass my tests, even in parallel GC mode. Incremental GC support is
  1600. disabled if thread support is enabled, due to the signal issues.
  1601. - Eliminated name-space-incorrect definition of _cdecl from gc_cpp.h.
  1602. - Added GC_debug_malloc_replacement and GC_debug_realloc_replacement
  1603. declarations to gc.h. On IA64, this is required for REDIRECT_MALLOC
  1604. to work correctly with these.
  1605. - Fixed Linux USE_PROC_FOR_LIBRARIES to work with a 64-bit /proc format.
  1606. Since 6.1:
  1607. - Guard the test for GC_DUMP_REGULARLY in misc.c with
  1608. "#ifndef NO_DEBUGGING". Otherwise it fails to build with NO_DEBUGGING
  1609. defined. (Thanks to Manuel Serrano.)
  1610. - Message about retrying suspend signals was incorrectly generated even when
  1611. flag was not set.
  1612. - Cleaned up MACOSX/NEXT root registration code. There was apparently a
  1613. separate ifdef case in GC_register_data_segments() for no reason.
  1614. - Removed MPROTECT_VDB for MACOSX port, based on one negative report.
  1615. - Arrange for gc.h and friends to be correctly installed with GNU-style
  1616. "make install".
  1617. - Enable the GNU-style build facility include C++ support in the library
  1618. with --enable-cplusplus. (Thanks to Thomas Maier for some of the patch.)
  1619. - Mark from GC_thread_key in linux_threads.c, in case that's allocated
  1620. from the garbage collected heap, as it is with our own thread-specific
  1621. storage implementation. (Thanks to Jeff Sturm.)
  1622. - Mark all free list header blocks if they are heap allocated. This avoids
  1623. some unnecessary tracing. And it remains correct if we clear the
  1624. root set. (Thanks to Jeff Sturm for identifying the bug.)
  1625. - Improved S390/Linux support. Add S390/Linux 64-bit support. (Thanks
  1626. to Ulrich Weigand.)
  1627. - Corrected the spelling of GC_{M,C}ALLOC_EXPLICTLY_TYPED to
  1628. GC_{M,C}ALLOC_EXPLICITLY_TYPED in gc_typed.h. This is technically
  1629. an interface change. Based on the fact that nobody reported this,
  1630. I suspect/hope there were no clients.
  1631. - Cleaned up gc_typed.h so that (1) it adds an extern "C" declaration
  1632. when appropriate, (2) doesn't generate references to undefined internal
  1633. macros, and (3) allows easier manual construction of descriptors.
  1634. - Close the file descriptor used by GC_print_address_map().
  1635. - Set the "close-on-exec" bit for various file descriptors maintained
  1636. for the collector's internal use.
  1637. - Added a hack to find memory segments owned by the system allocator
  1638. under win32. Based on my tests, this tends to eventually find all
  1639. segments, though it may take a while. There appear to be cleaner,
  1640. but slower solutions under NT/XP. But they rely on an API that's
  1641. unsupported under 9X.
  1642. - Changed Linux PowerPC stack finding to LINUX_STACKBOTTOM. (Thanks
  1643. to Akira Tagoh for pointing out that HEURISTIC1 doesn't work on
  1644. 64-bit kernels.)
  1645. - Added GC_set_free_space_divisor to avoid some Windows dll issues.
  1646. - Added FIXUP_POINTER, POINTER_SHIFT, POINTER_MASK to allow preprocessing
  1647. of candidate pointers for tagging, etc.
  1648. - Always lock around GC_notify_full_gc(). Simplified code for
  1649. invoking GC_notify_full_gc().
  1650. - Changed the way DATASTART is defined on FreeBSD to be robust against
  1651. an unmapped page after etext. (Thanks to Hironori Sakamoto for
  1652. tracking down the intermittent failure.)
  1653. - Made GC_enable() and GC_disable() official. Deprecated direct update
  1654. of GC_dont_gc. Changed GC_gcollect to be a noop when garbage collection
  1655. is disabled.
  1656. - Call GC_register_dynamic_libraries before stopping the world on Linux,
  1657. in order to avoid a potential deadlock due to the dl_iterate_phdr lock.
  1658. - Introduced a more general mechanism for platform-dependent code to
  1659. decide whether the main data segment should be handled separately
  1660. from dynamic libraries, or registered by GC_register_dynamic_libraries.
  1661. The latter is more reliable and easier on Linux with dl_iterate_phdr.
  1662. Since 6.2alpha1:
  1663. - Fixed the completely broken FreeBSD code in 6.2alpha1. (Thanks to
  1664. Hironori Sakamoto for the patch.)
  1665. - Changed IRIX reference in dbg_mlc.c to IRIX5. (Thanks to Marcus Herbert.)
  1666. - Attempted to work around the problems with .S filenames and the SGI
  1667. compiler. (Reported by several people. Untested.)
  1668. - Worked around an HP/UX make issue with the GNU-style build process.
  1669. - Fixed the --enable-cplusplus build machinery to allow builds without
  1670. a C++ compiler. (That was always the intent ...)
  1671. - Changed the debugging allocation macros to explicitly pass the return
  1672. address for Linux and XXXBSD on hardware for which we can't get stack
  1673. traces. Use __builtin_return_address(0) to generate it when possible.
  1674. Some of the configuration work was cleaned up (good) and moved to gc.h
  1675. (bad, but necessary). This should make leak detection more useful
  1676. on a number of platforms. (Thanks to Fabian Thylman for the suggestion.)
  1677. - Fixed compilation problems in dbg_mlc.c with GC_ADD_CALLER.
  1678. - Bumped revision number for dynamic library.
  1679. Since 6.2alpha2:
  1680. - Don't include execinfo.h in os_dep.c when it's not needed, and may not exist.
  1681. Since 6.2alpha3:
  1682. - Use LINUX_STACKBOTTOM for >= glibc2.2 on Linux/MIPS. (See Debian bug
  1683. # 177204)
  1684. - Integrated Jeff Sturm and Jesse Rosenstock's MACOSX threads patches.
  1685. - Integrated Grzegorz Jakacki's substantial GNU build patch. "Make dist"
  1686. should now work for the GNU build process. Documentation files
  1687. are installed under share/gc.
  1688. - Tweaked gc_cpp.h to again support the Borland compiler. (Thanks to
  1689. Rene Girard for pointing out the problems.)
  1690. - Updated BCC_MAKEFILE (thanks to Rene Girard).
  1691. - Added GC_ASSERT check for minimum thread stack size.
  1692. - Added --enable-gc-assertions.
  1693. - Added some web documentation to the distribution. Updated it in the
  1694. process.
  1695. - Separate gc_conf_macros.h from gc.h.
  1696. - Added generic GC_THREADS client-defined macro to set the appropriate
  1697. GC_XXX_THREADS internal macro. (gc_config_macros.h.)
  1698. - Add debugging versions of _ignore_off_page allocation primitves.
  1699. - Moved declarations of GC_make_closure and GC_debug_invoke_finalizer
  1700. from gc.h to gc_priv.h.
  1701. - Reset GC_fail_count even if only a small allocation succeeds.
  1702. - Integrated Brian Alliet's patch for dynamic library support on Darwin.
  1703. - gc_cpp.h's gc_cleanup destructor called GC_REGISTER_FINALIZER_IGNORE_SELF
  1704. when it should have called the lower case version, since it was
  1705. explicitly computing a base pointer.
  1706. Since 6.2alpha4:
  1707. - GC_invoke_finalizers could, under rare conditions, set
  1708. GC_finalizer_mem_freed to an essentially random value. This could
  1709. possibly cause unbounded heap growth for long-running applications
  1710. under some conditions. (The bug was introduced in 6.1alpha5, and
  1711. is not in gcc3.3. Thanks to Ben Hutchings for finding it.)
  1712. - Attempted to sanitize the various DLL macros. GC_USE_DLL disappeared.
  1713. GC_DLL is used instead. All internal tests are now on GC_DLL.
  1714. README.macros is now more precise about the intended meaning.
  1715. - Include DllMain in the multithreaded win32 version only if the
  1716. collector is actually built as a dll. (Thanks to Mohan Embar for
  1717. a version of the patch.)
  1718. - Hide the cygwin threadAttach/Detach functions. They were violating our
  1719. namespace rules.
  1720. - Fixed an assertion in GC_check_heap_proc. Added GC_STATIC_ASSERT.
  1721. (Thanks again to Ben Hutchings.)
  1722. - Removed some obsolete definitions for Linux/PowerPC in gcconfig.h.
  1723. - CORD_cat was not rebalancing unbalanced trees in some cases, violating
  1724. a CORD invariant. Also tweaked the rebalancing rule for
  1725. CORD_cat_char_star. (Thanks to Alexandr Petrosian for the bug report
  1726. and patch.)
  1727. - Added hand-coded structured exception handling support to mark.c.
  1728. This should enable support of dynamic libraries under win32 with
  1729. gcc-compiled code. (Thanks to Ranjit Mathew for the patch.)
  1730. Turned on dynamic library scanning for win32/gcc.
  1731. - Removed some remnants of read wrapping. (Thanks to Kenneth Schalk.)
  1732. GC_USE_LD_WRAP ws probably broken in recent versions.
  1733. - The build could fail on some platforms since gcconfig.h could include
  1734. declarations mentioning ptr_t, which was not defined, e.g. when if_mach
  1735. was built. (Thanks to Yann Dirson for pointing this out.) Also
  1736. cleaned up tests for GC_PRIVATE_H in gcconfig.h a bit.
  1737. - The GC_LOOP_ON_ABORT environment variable interfered with incremental
  1738. collection, since the write fault handler was erroneously overridden.
  1739. Handlers are now set up in the correct order.
  1740. - It used to be possible to call GC_mark_thread_local_free_lists() while
  1741. the world was not stopped during an incremental GC. This was not safe.
  1742. Fortunately, it was also unnecessary. Added GC_world_stopped flag
  1743. to avoid it. (This caused occasional crashes in GC_set_fl_marks
  1744. with thread local allocation and incremental GC. This probably happened
  1745. primarily on old, slow multiprocessors.)
  1746. - Allowed overriding of MAX_THREADS in win32_threads.c from the build
  1747. command line. (Patch from Yannis Bres.)
  1748. - Taught the IA64/linux code to determine the register backing store base from
  1749. /proc/self/maps after checking the __libc symbol, but before guessing.
  1750. (__libc symbols are on the endangered list, and the guess is likely to not
  1751. always be right for 2.6 kernels.) Restructured the code to read and parse
  1752. /proc/self/maps so it only exists in one place (all platforms).
  1753. - The -DUSE_PROC_FOR_LIBRARIES code was broken on Linux. It claimed that it
  1754. also registered the main data segment, but didn't actually do so. (I don't
  1755. think anyone actually uses this configuration, but ...)
  1756. - Made another attempt to get --enablecplusplus to do the right thing.
  1757. Since there are unavoidable problems with C programs linking against a
  1758. dynamic library that includes C++ code, I separated out the c++ code into
  1759. libgccpp.
  1760. Since 6.2alpha5:
  1761. - There was an extra underscore in the name of GC_save_registers_in_stack
  1762. for NetBSD/SPARC. (Thanks to Jaap Boender for the patch.)
  1763. - Integrated Brian Alliet's patch for Darwin. This restructured the
  1764. linuxthreads/pthreads support to separate generic pthreads support
  1765. from more the system-dependent thread-stopping code. I believe this
  1766. should make it easier to eliminate the code duplication between
  1767. pthreads platforms in the future. The patch included some other
  1768. code cleanups.
  1769. - Integrated Dan Bonachea's patch to support AIX threads. This required
  1770. substantial manual integration, mostly due to conflicts with other
  1771. recent threads changes. It may take another iteration to
  1772. get it to work.
  1773. - Removed HPUX/PA-RISC support from aix_irix_threads.c. It wasn't used
  1774. anyway and it cluttered up the code. And anything we can do to migrate
  1775. towards generic pthreads support is a good thing.
  1776. - Added a more explicit test for tracing of function arguments to test.c.
  1777. (Thanks to Dan Grayson.)
  1778. - Added Akira Tagoh's PowerPC64 patch.
  1779. - Fixed some bit rot in the Cygwin port. (Thanks to Dan Bonachea for
  1780. pointing it out.) Gc.h now includes just windows.h, not winbase.h.
  1781. - Declared GC_save_regs_in_stack() in gc_priv.h. Remove other declarations.
  1782. - Changed --enable-cplusplus to use automake consitionals. The old way
  1783. confused libtool. "Make install" didn't work correctly for the old version.
  1784. Previously --enable-cplusplus was broken on cygwin.
  1785. - Changed the C version of GC_push_regs to fail at compile time if it is
  1786. generated with an empty body. This seems to have been the cause of one
  1787. or two subtle failures on unusual platforms. Those failures should
  1788. now occur at build time and be easily fixable.
  1789. Since 6.2alpha6:
  1790. - Integrated a second round of Irix/AIX patches from Dan Bonachea.
  1791. Renamed mips_sgi_mach_dep.S back to mips_sgi_mach_dep.s, since it requires
  1792. the Irix assembler to do the C preprocessing; gcc -E doesn't work.
  1793. - Fixed Makefile.direct for DARWIN. (Thanks to Manuel Serrano.)
  1794. - There was a race between GC_pthread_detach and thread exit that could
  1795. result in a thread structure being deallocated by GC_pthread_detach
  1796. eventhough it was still needed by the thread exit code. (Thanks to
  1797. Dick Porter for the small test case that allowed this to be debugged.)
  1798. - Fixed version parsing for non-alpha versions in acinclude.m4 and
  1799. version checking in version.h.
  1800. Since 6.2:
  1801. - Integrated some NetBSD patches forwarded to me by Marc Recht. These
  1802. were already in the NetBSD package.
  1803. - GC_pthread_create waited for the semaphore even if pthread_create failed.
  1804. Thanks to Dick Porter for the pthread_support.c patch. Applied the
  1805. analogous fix for aix_irix_threads.c.
  1806. - Added Rainer Orth's Tru64 fixes.
  1807. - The check for exceeding the thread table size in win32 threadDetach
  1808. was incorrect. (Thanks to Alexandr Petrosian for the patch.)
  1809. - Applied Andrew Begel's patch to correct some reentrancy issues
  1810. with dynamic loading on Darwin.
  1811. - GC_CreateThread() was neglecting to duplicate the thread handle in
  1812. the table. (Thanks to Tum Nguyen for the patch.)
  1813. - Pass +ESdbgasm only on PA-RISC machines with vendor compiler.
  1814. (Thanks to Roger Sayle for the patch.)
  1815. - Applied more AIX threads patches from Scott Ananian.
  1816. Since 6.3alpha1:
  1817. - Reenabled I_HOLD_LOCK assertion in aix_irix_threads.h.
  1818. - Put back the WINABI qualifier for GC_CreateThread. (Thanks to
  1819. Danny Smith for the patch. 6.3alpha1 had the qualifier in one place
  1820. but not elsewhere, which was clearly wrong.)
  1821. - Sometimes explicitly define __private_extern__ before DARWIN dyld.h
  1822. include. (Thanks to Andreas Tobker for postting the patch.)
  1823. - Included signal.h from pthread_support.c. Removed GC_looping_handler,
  1824. which was dead code.
  1825. - GC_find_start was misdeclared by gc_pmark.h if PRINT_BLACK_LIST was
  1826. defined. (Thanks to Glauco Masotti for testing and reporting this.)
  1827. Changed GC_find_start to never just return 0. According to its
  1828. comment it doesn't, and it's unclear that's correct.
  1829. - GC_alloc_large had several largely compensating bugs in the
  1830. computation of GC_words_wasted. (It was confused about bytes vs.
  1831. words in two places.)
  1832. - Integrated Slava Sysoltev's patch to support more recent versions of
  1833. the Intel compiler on IA64/Linux.
  1834. - Changed win32 spinlock initialization to conditionally set a spin count.
  1835. (Emmanual Stumpf pointed out that enabling this makes a large performance
  1836. difference on win32 multiprocessors.) Also cleaned up the win32 spinlock
  1837. initialization code a bit.
  1838. - Fixed thread support for HP/UX/IA64. The register backing store base for
  1839. the main thread was sometimes not set correctly. (Thanks to Laurent
  1840. Morichetti.)
  1841. - Added -DEMPTY_GETENV_RESULTS flag to work around Wine problem.
  1842. - Declare GC_stack_alloc and GC_stack_free in solaris_threads.h to
  1843. avoid 64-bit size mismatches. (Thanks to Bernie Solomon.)
  1844. - Fixed GC_generic_push_regs to avoid a potential and very unfortunate
  1845. tail call optimization. This could lead to prematurely reclaimed
  1846. objects on configurations that used the generic routine and the new
  1847. build infrastructure (which potentially optimizes mach_dep.c).
  1848. This was a serious bug, but it's unclear whether it has resulted in
  1849. any real failures.
  1850. - Fixed CORD_str to deal with signed characters. (Thanks to Alexandr
  1851. Petrosian for noticing the problem and supplying the patch.)
  1852. - Merged a couple of NOSYS/ECOS tests into os_dep.c from gcj. (Thanks
  1853. to Anthony Green.)
  1854. - Partially merged a win32 patch from Ben Hutchings, and substantially
  1855. revised other parts of win32_threads.c. It had several problems.
  1856. Under MinGW with a statically linked library, the main thread was
  1857. not registered. Cygwin detached threads leaked thread descriptors.
  1858. There were several race conditions. For now, unfortunately the
  1859. static threads limit remains, though we increased it, and made table
  1860. traversal cost depend on the actual thread count.
  1861. There is also still some code duplication with pthread_support.c.
  1862. (Thread descriptors did become much smaller, since Ben Hutchings
  1863. removed the thread context from them.)
  1864. - Integrated a Solaris configure.in patch from Rainer Orth.
  1865. - Added GC_IGNORE_FB and associated warning to very partially address
  1866. the issue of the collector treating a mapped frame buffer as part
  1867. of the root set. (Thanks to David Peroutka for providing some
  1868. insight. More would be helpful. Is there anything that can be used
  1869. to at least partially identify such memory segments?)
  1870. Since 6.3alpha2:
  1871. - Removed -DSMALL_CONFIG from BCC_MAKEFILE.
  1872. - Changed macros to test for an ARM processor (Patch from Richard Earnshaw.)
  1873. - Mostly applied a DJGPP patch from Doug Kaufman. Especially Makefile.dj
  1874. had suffered from serious bit rot.
  1875. - Rewrote GC_apply_to_maps, eliminating an off-by-one subscript error,
  1876. and a call to alloca (for lcc compatibility).
  1877. - Changed USE_MUNMAP behavior on posixy platforms to immediately remap
  1878. the memory with PROT_NONE instead of unmapping it. The latter risks
  1879. an intervening mmap grabbing the address space out from underneath us.
  1880. Updated this code to reflect a cleaner patch from Ulrich Drepper.
  1881. - Replaced _T with _Tp in new_gc_alloc.h to avoid a MACOS X conflict.
  1882. (Patch from Andrew Begel.)
  1883. - Dynamically choose whether or not lock should spin on win32. (Thanks
  1884. to Maurizio Vairani for the patch.) This may be a significant performance
  1885. improvement for win32.
  1886. - Fix Makefile.direct to actually include NT_STATIC_THREADS_MAKEFILE
  1887. in the distribution. (Again thanks to Maurizio Vairani.)
  1888. - Maybe_install_looping_handler() was accidentally exported, violating
  1889. our name space convention.
  1890. - Made os_dep.c use sigsetjmp and SA_NODEFER for NetBSD. (Thanks to
  1891. Christian Limpach.) (I generalized the patch to use sigsetjmp on all
  1892. UNIX_LIKE platforms, admittedly a slightly risky move. But it may avoid
  1893. similar problems on some other platforms. I also cleaned up the defn
  1894. of UNIX_LIKE a bit. - Hans)
  1895. - Integrated Andrew Begel's Darwin threads patch, adjusted according to
  1896. some of Fergus Hendersons's comments. (Patch didn't apply cleanly,
  1897. errors are possible.)
  1898. - Added another test or two for the Intel 8.0 compiler to avoid
  1899. confusing it with gcc. The single-threaded collector should now build
  1900. with icc, at least on ia64.
  1901. Since 6.3alpha3:
  1902. - USE_MMAP was broken by confusion in the code dealing with USE_MMAP_ANON.
  1903. (This was pointed out, and fixes were suggested by several other people.)
  1904. - Darwin supprt was broken in alpha3 as a result of my misintegration of
  1905. Andrew Begel's patches. Fixed with another patch from Andrew Begel.
  1906. - A new sanity check in pthread_stop_world.c:GC_push_all_stacks() was
  1907. overly aggressive. We may collect from an unregistered thread during
  1908. thread creation. Fixed by explicitly checking for that case. (Added
  1909. GC_in_thread_creation.)
  1910. Since 6.3alpha4:
  1911. - Fix & vs && typo in GC_generic_malloc and
  1912. GC_generic_malloc_ignore_off_page. (Propagated from the gcc tree.)
  1913. - Removed SA_NODEFER hack from NetBSD and Solaris write-protect handler.
  1914. (According to Christian Limpach, the NetBSD problem is fixed.
  1915. Presumably so is the Solaris 2.3 problem.)
  1916. - Removed placement delete from gc_cpp.h for the SGI compiler.
  1917. (Thanks to Simon Gornall for the patch.)
  1918. - Changed semantics of the GC_IGNORE_FB environment variable, based
  1919. on experimentation by Nicolas Cannasse pointing out that the old
  1920. interpretation was useless. We still need help in identifying win32
  1921. graphics memory mappings. The current "solution" is a hack.
  1922. - Removed "MAKEOVERRIDES =" from Makefile.am and thus Makefile.in.
  1923. It probably made more sense in the gcc context.
  1924. - Explicitly ensure that NEED_FIND_LIMIT is defined for {Open,Net}BSD/ELF.
  1925. - Replaced USE_HPUX_TLS macro by USE_COMPILER_TLS, since gcc often
  1926. supports the same extension on various platforms.
  1927. - Added some basic (completely untested) defines for win64, in support
  1928. of future work.
  1929. - Declared GC_jmp_buf in os_dep.s as JMP_BUF instead of jmp_buf, fixing
  1930. a memory overwrite bug on Solaris and perhaps other platforms.
  1931. - Added 0 != __libc_stack_end test to GC_linux_stack_base. (Thanks to Jakub
  1932. Jelinek, both for the patch, and for explaining the problem to me.)
  1933. Otherwise "prelink"ing could cause the collector to fail.
  1934. - Changed default thread local storage implementation to USE_PTHREAD_SPECIFIC
  1935. for HP/UX with gcc. The compiler-based implementation appears to work
  1936. only with the vendor compiler.
  1937. - Export GC_debug_header_size and GC_USR_PTR_FROM_BASE from gc_mark.h,
  1938. making client mark code cleaner and less dependent on GC version.
  1939. - Export several new procedures and GC_generic_malloc from gc_mark.h
  1940. to support user-defined kinds. Use the new procedures to replace existing
  1941. code in gcj_mlc.c and typd_mlc.c.
  1942. - Added support for GC_BACKTRACES.
  1943. - Fixed a remaining problem in CORD_str with signed characters. (Thanks
  1944. to Alexandr Petrosian for the patch.)
  1945. - Removed supposedly redundant, but very buggy, definitions of finalizer
  1946. macros from javaxfc.h. Fortunately this file probably has no users.
  1947. The correct declarations were already in gc.h.
  1948. - Also need to set GC_in_thread_creation while waiting for GC during
  1949. thread termination, since it is also possible to collect from an
  1950. unregistered thread in that case.
  1951. - Define NO_GETENV for Windows CE, since getenv doesn't appear to exist.
  1952. + some other minor WinCE fixes. (Thanks to Alain Novak.)
  1953. - Added GC_register_describe_type_fn.
  1954. - Arrange for debugging finalizer registration to ignore non-heap
  1955. registrations, since the regular version of the routine also behaves
  1956. that way.
  1957. - GC_gcj_malloc and friends need to check for finalizers waiting to be run.
  1958. One of the more obscure allocation routines with missing a LOCK() call.
  1959. - Fixed cvtres invocations in NT_MAKEFILE and NT_STATIC_THREADS_MAKEFILE
  1960. to work with VS.NET.
  1961. - Cleaned up GC_INIT calls in test. Updated gc.man to encourage GC_INIT
  1962. use in portable code.
  1963. - Taught the GC to use libunwind if --enable-full-debug is specified on
  1964. IA64 and libunwind is present.
  1965. - The USE_MUNMAP code could get confused about the age of a block and
  1966. prematurely unmap it. GC_unmap_old had a bug related to wrapping of
  1967. GC_gc_no. GC_freehblk and GC_merge_unmapped didn't maintain
  1968. hb_last_reclaimed reasonably when blocks were merged. The code was
  1969. fixed to reflect original intent, but that may not always be an
  1970. improvement. See todo list item.
  1971. Since 6.3alpha5:
  1972. - Define USE_GENERIC_PUSH_REGS for NetBSD/M68K.
  1973. - Fixed the X86_64 PREFETCH macros to correctly handle ia32e (which uses
  1974. different prefetch instructions from AMD64). (Thanks to H.J. Lu.)
  1975. - GC_config_macros.h did not correctly define GC_WIN32_THREADS from
  1976. GC_THREADS.
  1977. - Added simple_example.html.
  1978. - Merged Andrew Gray's patch to correctly restore signal handlers on
  1979. FreeBSD.
  1980. - Merged a patch from Andreas Jaeger to deal with prefetch-related warnings
  1981. on x86-64. Added some other casts so that the PREFETCH macros
  1982. always get a ptr_t argument. Removed some casts inthe PREFETCH
  1983. implementations.
  1984. - At Jesse Jones suggestion: Added a header guard for gc_allocator.h
  1985. and changed GC_debug_free to clobber contents of deallocated object.
  1986. - The signal masking code in pthread_stop_world.c contained some errors.
  1987. In particular SIGSEGV was masked in the handler, in spite of the fact that
  1988. it wrote to the heap. This could lead to an uncaught SIGSEGV, which
  1989. apparently became much more likely in Linux 2.6. Also fixed some
  1990. typos, and reduced code duplication in the same area.
  1991. - Remove ltconfig, clean up configure messages for DGUX (thanks to
  1992. Adrian Bunk for the patches).
  1993. - Integrated NetBSD/OpenBSD patches from Marc Recht and Matthias Drochner.
  1994. Since gc6.3alpha6:
  1995. - Compile test_cpp.cc with CXXCOMPILE instead of COMPILE.
  1996. - Very large allocations could cause a collector hang. Correct
  1997. calculation of GC_collect_at_heapsize.
  1998. - GC_print_hblkfreelist printed some bogus results if USE_MUNMAP
  1999. was defined.
  2000. - The generic GC_THREADS macro didn't work correctly on Solaris,
  2001. since the implementation failed to include gc_config_macros.h
  2002. before deciding whether or not to compile the rest of the file.
  2003. - Threadlibs.c failed to expand the generic GC_THREADS macro.
  2004. - Correct MacOSX thread stop code. (Thanks to Dick Porter.)
  2005. - SMALL_OBJ definition was off by one. This could cause crashes
  2006. at startup. (Thanks to Zoltan Varga for narrowing this down to
  2007. a trivial test case.)
  2008. - Integrate Paolo Molara's patch to deal with a race in the Darwin
  2009. thread stopping code.
  2010. - Changed X86_64 implementation to use SA_SIGINFO in the MPROTECT_VDB
  2011. implementation. The old approach appears to have been broken by
  2012. recent kernels.
  2013. - Add GC_ATTR_UNUSED to eliminate a warning in gc_allocator.h. (Thanks
  2014. to Andrew Begel.)
  2015. - Fix GC_task_self declaration in os_dep.c. (Thanks to Andrew Pinski.)
  2016. - Increase INITIAL_BUF_SZ in os_dep.c for Solaris /proc reads.
  2017. Since 6.3:
  2018. - Merge gcconfig.h changes from gcc tree.
  2019. - Unconditionally include gc_priv.h in solaris_pthreads.c, win32_threads.h,
  2020. aix_irix_threads.c, and solaris_threads.c to get thread definitions.
  2021. - Start marker threads in GC_thr_init, so that they get started even
  2022. if no other threads are ever started. (Oddly enough, the parallel
  2023. collector worked correctly, though not well, with no helper threads.)
  2024. - Go ahead and split large blocks in GC_allochblk_nth if GC_dont_gc
  2025. is set. (Thanks to Alexander Petrossian.)
  2026. - GC_PRINT_BACK_HEIGHT would deadlock with thread support.
  2027. - Let in_progress_space in backgraph.s grow dynamically.
  2028. - Fix README.solaris2. The GC_thr_init() hack doesn't work anymore.
  2029. - Convert GC_finalizer_mem_freed to bytes in allchblk.c.
  2030. - Add missing declaration for GC_generic_malloc_words_small_inner.
  2031. Without it, s390x breaks. (Thanks to Ulrich Weigand.)
  2032. - Applied several MacOSX patches to support older tool chains.
  2033. (Thanks to Stefan Ring.)
  2034. - Bug fix for NetBSD/amd64. (Thanks to Marc Recht.) Add NetBSD/sh3
  2035. support. (Thanks to Uchiyama Yasushi.)
  2036. - Fixed an uninitialized variable in cordprnt.c. (Thanks to gcc for
  2037. providing the warning.)
  2038. - Eliminated some, but not all, gcc -Wall warnings.
  2039. - Changed some old style casts to reinterpret_cast in new_gc_alloc.h.
  2040. (Thanks to Dan Grayson.)
  2041. - GC_extend_size_map shouldn't adjust for GC_all_interior_pointers if
  2042. GC_DONT_ADD_BYTE_AT_END is set.
  2043. - Changed some (long) casts to (word) in preparation for win64.
  2044. (Thanks to Peter Colson.)
  2045. - Changed "int stack_size" declaration in pthread_support.c to use
  2046. size_t. (Only mattered with GC_ASSERTIONS enabled.)
  2047. - Added CRIS (etrax) support. (Thanks to Simon Posnjak and
  2048. Hans-Peter Nilsson.)
  2049. - Removed GC_IGNORE_FB frame buffer recognition, and replaced
  2050. it with a check that the mapping type is MEM_IMAGE.
  2051. In theory, this should work much better, but it is a high
  2052. risk change for win32. (Thanks to Ashley Bone for the crucial
  2053. experimental data behind this, and to Rutger Ovidus for
  2054. some further experiments.)
  2055. - Fixed print_block_list to print the correct kind number for
  2056. STUBBORN. (Thanks to Rutger Ovidus.)
  2057. - GC_allochblk_nth incremented GC_words_wasted by bytes rather than
  2058. words.
  2059. - Consider GC_words_wasted in GC_adj_words_allocd only if it is within
  2060. reason. (A hack to avoid some extremely unlikely scenarios in which
  2061. we manage to allocate only "wasted" space. 7.0 has a better fix.)
  2062. - Changed PowerPC GC_clear implementation to use lwsync instead of
  2063. eieio, since the documentation recommends against eieio, and
  2064. it seems to be incorrect if the preceding memory op is a load.
  2065. - Fixed print_block_list to print the correct kind number for
  2066. STUBBORN. (Thanks to Rutger Ovidus.)
  2067. - Have configure.in generate an error if it is asked to support
  2068. pthreads, but doesn't know how to.
  2069. - Added Kazuhiro Inaoka's patch for Renesas M32R support.
  2070. - Have the GNU build mechanism link with -ldl. Rename THREADLIBS
  2071. to THREADDLLIBS to reflect this. (Thanks to Sven Verdoolaege.)
  2072. - Added Hannes Mehnert's patch for FreeBSD/SPARC support.
  2073. - Merged some FreeBSD specific patches to threadlibs.c and dyn_load.c.
  2074. (Thanks tp John Merryweather Cooper.)
  2075. - Define MPROTECT_VDB on MACOSX only if threads are being used, since the
  2076. dirty page tracking mechanism uses threads. (This avoids an undefined
  2077. reference to _GC_darwin_register_mach_handler_thread.)
  2078. - By popular demand, use __libc symbols only if we are built with
  2079. USE_LIBC_PRIVATES, which is off by default, and not otherwise documented.
  2080. - Ignore GC_enable_incremental() requests when KEEP_BACK_PTRS is set.
  2081. The GC itself will dirty lots of pages in this cases, probably making
  2082. it counterproductive on all platforms. And the DARWIN port crashes.
  2083. Since GC6.4:
  2084. - Integrated Paolo Molaro's patch to deal with EINTR in sem_wait.
  2085. - Make GC_approx_sp() write to dummy location to ensure that stack
  2086. is grown here, when sp looks reasonable, rather than later, when
  2087. it might look like a bad memory reference. (Problem was never
  2088. observed that I know of. But on rereading the code it seemed
  2089. dubious.)
  2090. - Separate out GC_with_callee_saves_pushed and sometimes call
  2091. it from GC_suspend_handler in pthread_stop_world.c. Callee-save
  2092. register values sometimes failed to get traced under HP/UX on
  2093. PA-RISC. Linux/IA64 had the same problem, though non-stacked
  2094. callee-save registers seem to be so rarely used there that nobody
  2095. ever noticed.
  2096. - Integrated an ancient Darwin powerpc_darwin_machine_dep.s patch
  2097. from Andreas Tobler, which I had lost.
  2098. - Fix compare_and_exchange implementation for gcc/IA64 to deal with
  2099. pickier compiler versions.
  2100. - Fixed Itanium 32-bit ABI support (HP/UX). In particular, the
  2101. compare_and_exchange implementation didn't consider that possibility.
  2102. - Undefine GC_pthread_detach in win32_threads.c. (Thanks to
  2103. Tagliapietra Tommaso.)
  2104. - Fixed inclusion of frame.h for NETBSD in os_dep.c.
  2105. - Applied Dan Bonachea's patch to use mmap on AIX.
  2106. - Several fixes to resurrect the Irix port on recent OS versions.
  2107. - Change ALPHA to use LINUX_STACKBOTTOM.
  2108. - Change SPARC64/LINUX to also use LINUX_STACKBOTTOM. Deal with potential
  2109. bad values of __libc_stack_end on that platform. (Thanks to David Miller.)
  2110. - Relax gctest to allow larger heap if ALIGN_DOUBLE isn't set.
  2111. (Unnecessary in 7.0)
  2112. - Force a define of __STDC__=0 for the IBM compiler on AIX, so that
  2113. we get prototypes. (Unnecessary in 7.0)
  2114. - GC_INIT definition for AIX and CYGWIN referred to DATASTART and DATAEND
  2115. which are only defined in private include files.
  2116. - Integrated some small gcconfig.h patches from Dan Bonachea. Also
  2117. relaxed assertion about FreeBSD stack size in pthread_support.c.
  2118. - Integrated Andrew Begel's darwin_stop_world.c patch for 64-bit
  2119. support. This may need additional work.
  2120. - Avoided potentially infinite recursion in GC_save_callers if
  2121. the system backtrace calls malloc. The workaround currently requires
  2122. __thread support if this code is used with threads.
  2123. - Avoided another similar infinite recursion by conditionally
  2124. invoking GC_save_callers in alloc.c. (Thanks to Matthias Andree
  2125. for helping to track down both of these.)
  2126. - Removed all traces of aix_irix_threads.c. AIX and Irix now use
  2127. pthread_support.c and pthread_stop_world.c. The old code appeared
  2128. to be unreliable for AIX, and was not regularly maintained.
  2129. - On Irix, ignore segments with MA_FETCHOP or MA_NOTCACHED attributed;
  2130. they're not always safe to read.
  2131. - Fixed a previously vacuous assertion (diagnosed by the SGI compiler)
  2132. in GC_remove_from_fl.
  2133. - Fix stack_size assertion in GC_pthread_create.
  2134. - Fix assertion in GC_steal_mark_stack.
  2135. Since 6.5
  2136. - Fix CPU count detection for Irix and FreeBSD. (Thanks to Dan Bonachea.)
  2137. - Integrate Dan Bonachea's patch for the IBM XLC compiler on Darwin.
  2138. - Integrated Andreas Tobler's FreeBSD/PowerPC patch.
  2139. - Don't access the GC thread structure from the restart handler. It's
  2140. unsafe, since the handler may run too late. (Thanks to Ben Maurer for
  2141. tracking this down.)
  2142. - Applied Christian Thalinger's patch to change comment syntax in
  2143. alpha_mach_dep.S.
  2144. - Added test for GC_no_dls in GC_dyld_image_add for DARWIN. (Thanks to
  2145. Juan Jose Garcia Ripoli).
  2146. - Use LINUX_STACKBOTTOM for Linux/SH and LINUX/ARM. (Thanks to Sugioka
  2147. Toshinobu and Christian Thalinger.)
  2148. - Rewrote GC_parse_map_entry. This assumed a fixed column layout of
  2149. /proc/self/maps on Linux. This ceased to be true about 2 years ago.
  2150. The old code is probably quite problemetic with -DREDIRECT_MALLOC. It
  2151. is also used by default for IA64, though I haven't seen actual failures
  2152. there.
  2153. - More consistently define HBLKSIZE to 4096 on 64 bit architectures with
  2154. 4K pages. (Thanks to Andrew Haley.)
  2155. - With win32 threads, GC_stop_world needs to acquire GC_write_cs. (Thanks
  2156. to Ben Hutchings for the observation and patch.)
  2157. - Move up struct callinfo declaration to make gcc 4.0.2. happy.
  2158. To do:
  2159. - The USE_MUNMAP code should really use a separate data structure
  2160. indexed by physical page to keep track of time since last use of
  2161. a page. Using hblk headers means we lose track of ages when
  2162. blocks are merged, and we can't unmap pages that have been allocated and
  2163. dropped by the blacklisting code. I suspect both of these matter.
  2164. - A dynamic libgc.so references dlopen unconditionally, but doesn't link
  2165. against libdl.
  2166. - GC_proc_fd for Solaris is not correctly updated in response to a
  2167. fork() call. Thus incremental collection in the child won't work
  2168. correctly. (Thanks to Ben Cottrell for pointing this out.)
  2169. - --enable-redirect-malloc is mostly untested and known not to work
  2170. on some platforms.
  2171. - There seem to be outstanding issues on Solaris/X86, possibly with
  2172. finding the data segment starting address. Information/patches would
  2173. be appreciated.
  2174. - Very large root set sizes (> 16 MB or so) could cause the collector
  2175. to abort with an unexpected mark stack overflow. (Thanks again to
  2176. Peter Chubb.) NOT YET FIXED. Workaround is to increase the initial
  2177. size.
  2178. - The SGI version of the collector marks from mmapped pages, even
  2179. if they are not part of dynamic library static data areas. This
  2180. causes performance problems with some SGI libraries that use mmap
  2181. as a bitmap allocator. NOT YET FIXED. It may be possible to turn
  2182. off DYNAMIC_LOADING in the collector as a workaround. It may also
  2183. be possible to conditionally intercept mmap and use GC_exclude_static_roots.
  2184. The real fix is to walk rld data structures, which looks possible.
  2185. - Incremental collector should handle large objects better. Currently,
  2186. it looks like the whole object is treated as dirty if any part of it
  2187. is.