Commit Graph

2609 Commits

Author SHA1 Message Date
David Cole c75f404065 Merge topic 'kwsys-environ-cleanup'
e48796b KWSys: Fix SystemTools environment memory handling (#13156)
b10c5cb CTest: Simplify environment save/restore
2012-05-01 14:09:12 -04:00
Brad King e48796b26b KWSys: Fix SystemTools environment memory handling (#13156)
The SystemTools::PutEnv function tries to provide the "putenv" API
without leaking memory.  However, the kwsysDeletingCharVector singleton
frees memory that may still be referenced by the environment table,
having been placed there by putenv.  If any static destruction or
processing by an external tool happens after the singleton is destroyed
and accesses the environment it will read invalid memory.

Replace use of putenv with setenv/unsetenv when available.  The latter
manage internal copies of the values passed instead of referencing the
original memory.  When setenv/unsetenv are not available use putenv with
a singleton that removes its values from the environment before freeing
their memory.  This requires an "unputenv" implementation.  On at least
some platforms it must be written in terms of "putenv" because other
APIs are not available and direct modification of the "environ" global
is not safe (e.g. on Windows there is interaction with "wenviron").
Fortunately either putenv("A=") or putenv("A") will remove "A" from the
environment on these platforms.  On other platforms fall back to direct
manipulation of "environ".

Also add UnPutEnv to the API and add a test for the behavior of both.
2012-04-27 08:13:52 -04:00
Brad King 5f807a62a5 KWSys: Remove DateStamp
KWSys is no longer shared in projects via a server-side directory
symlink in CVS.  An automated nightly date stamp commit can no longer be
shared by multiple projects directly.  It needs a per-project replay
robot so the nightly commits end up needing N+1 robots instead of N.
Remove the DateStamp feature because it is no longer useful or
maintained by nightly commits.
2012-04-25 11:40:24 -04:00
KWSys Robot 20ba4fe1bf KWSys Nightly Date Stamp 2012-04-20 09:37:16 -04:00
KWSys Robot 168f38ee5f KWSys Nightly Date Stamp 2012-04-19 00:05:04 -04:00
KWSys Robot 32e0b1975d KWSys Nightly Date Stamp 2012-04-18 00:05:05 -04:00
KWSys Robot 233b5cbaf7 KWSys Nightly Date Stamp 2012-04-17 00:05:04 -04:00
KWSys Robot 31e7fadbb3 KWSys Nightly Date Stamp 2012-04-16 00:05:05 -04:00
KWSys Robot 38ebdf0c33 KWSys Nightly Date Stamp 2012-04-15 00:05:05 -04:00
KWSys Robot b4cb977f76 KWSys Nightly Date Stamp 2012-04-14 00:05:12 -04:00
KWSys Robot ad3d2b450f KWSys Nightly Date Stamp 2012-04-13 00:05:03 -04:00
KWSys Robot 89a67804bf KWSys Nightly Date Stamp 2012-04-12 00:05:05 -04:00
KWSys Robot 621c0893b8 KWSys Nightly Date Stamp 2012-04-11 00:05:04 -04:00
KWSys Robot 797653b8a7 KWSys Nightly Date Stamp 2012-04-10 00:05:05 -04:00
KWSys Robot dcecea3953 KWSys Nightly Date Stamp 2012-04-09 00:05:08 -04:00
KWSys Robot a00aa8ec8c KWSys Nightly Date Stamp 2012-04-08 00:05:09 -04:00
KWSys Robot bad16ab075 KWSys Nightly Date Stamp 2012-04-07 00:05:06 -04:00
KWSys Robot 15f238fd6e KWSys Nightly Date Stamp 2012-04-06 00:05:06 -04:00
KWSys Robot 3f29f755c7 KWSys Nightly Date Stamp 2012-04-05 00:05:07 -04:00
KWSys Robot d19008cd54 KWSys Nightly Date Stamp 2012-04-04 00:05:06 -04:00
KWSys Robot 9ad3fa7e85 KWSys Nightly Date Stamp 2012-04-03 00:05:07 -04:00
KWSys Robot 0454057f8a KWSys Nightly Date Stamp 2012-04-02 00:05:06 -04:00
KWSys Robot 32daddf950 KWSys Nightly Date Stamp 2012-04-01 00:05:07 -04:00
KWSys Robot 41d1a73e5b KWSys Nightly Date Stamp 2012-03-31 00:05:07 -04:00
KWSys Robot 7d99247454 KWSys Nightly Date Stamp 2012-03-30 00:05:06 -04:00
KWSys Robot 43fa86b60f KWSys Nightly Date Stamp 2012-03-29 00:05:09 -04:00
KWSys Robot 3eb3d5f306 KWSys Nightly Date Stamp 2012-03-28 00:05:06 -04:00
KWSys Robot 77ec098b44 KWSys Nightly Date Stamp 2012-03-27 00:05:07 -04:00
KWSys Robot 58db6ac299 KWSys Nightly Date Stamp 2012-03-26 00:05:06 -04:00
KWSys Robot 94c1dcffd6 KWSys Nightly Date Stamp 2012-03-25 00:05:13 -04:00
KWSys Robot c160f63490 KWSys Nightly Date Stamp 2012-03-24 00:05:08 -04:00
KWSys Robot e38e6bdbd3 KWSys Nightly Date Stamp 2012-03-23 00:05:05 -04:00
KWSys Robot 1df40fa188 KWSys Nightly Date Stamp 2012-03-22 00:05:05 -04:00
KWSys Robot 45b27021e5 KWSys Nightly Date Stamp 2012-03-21 00:05:05 -04:00
KWSys Robot f7533740e9 KWSys Nightly Date Stamp 2012-03-20 00:05:07 -04:00
KWSys Robot 9987d9522b KWSys Nightly Date Stamp 2012-03-19 00:05:07 -04:00
KWSys Robot 1bfe81e01e KWSys Nightly Date Stamp 2012-03-18 00:05:05 -04:00
KWSys Robot 6330f67a25 KWSys Nightly Date Stamp 2012-03-17 00:05:07 -04:00
KWSys Robot b4f949a3dd KWSys Nightly Date Stamp 2012-03-16 00:05:07 -04:00
KWSys Robot acc3862d0a KWSys Nightly Date Stamp 2012-03-15 00:05:05 -04:00
KWSys Robot 50fe2c6460 KWSys Nightly Date Stamp 2012-03-14 00:05:08 -04:00
KWSys Robot 738d94f57e KWSys Nightly Date Stamp 2012-03-13 00:05:06 -04:00
KWSys Robot 3551844a81 KWSys Nightly Date Stamp 2012-03-12 00:05:05 -04:00
KWSys Robot 335b6592dd KWSys Nightly Date Stamp 2012-03-11 00:05:10 -05:00
KWSys Robot 71c16e457c KWSys Nightly Date Stamp 2012-03-10 00:05:06 -05:00
KWSys Robot c7bdef5b48 KWSys Nightly Date Stamp 2012-03-09 00:05:04 -05:00
KWSys Robot 3a36fa9971 KWSys Nightly Date Stamp 2012-03-08 00:05:06 -05:00
KWSys Robot 285f0db9f4 KWSys Nightly Date Stamp 2012-03-07 00:05:05 -05:00
KWSys Robot ec50093be7 KWSys Nightly Date Stamp 2012-03-06 00:05:18 -05:00
KWSys Robot 17a099dd13 KWSys Nightly Date Stamp 2012-03-05 00:05:06 -05:00