diff --git a/ChangeLog b/ChangeLog index e0bf3afb0..289b51519 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,17 @@ +2014-01-16 Richard Frith-Macdonald + + * Source/NSKeyValueObserving.m: + Path info lifetime fixups to avoid crashes of the kind reported + by Mathias Bauer + 2014-01-14 Lubos Dolezel * Source/NSBundle.m: * Headers/Foundation/NSBundle.h: add -resourceURL 2014-01-14 Richard Frith-Macdonald - * Source\NSPathUtilities.m: - * Documentation\Base.gsdoc: + * Source/NSPathUtilities.m: + * Documentation/Base.gsdoc: Add GNUSTEP_DEVELOPER_DIR to allow definition of the native path to the msys/mingw development tools on windows. Also improve/fix lookup heuristics. diff --git a/Source/NSKeyValueObserving.m b/Source/NSKeyValueObserving.m index aabdf4777..89a0360c5 100644 --- a/Source/NSKeyValueObserving.m +++ b/Source/NSKeyValueObserving.m @@ -1096,15 +1096,17 @@ cifframe_callback(ffi_cif *cif, void *retp, void **args, void *user) return instance; } -/* Locks receiver and returns path info on success, otherwise - * leaves receiver munlocked and returns nil. +/* Locks receiver and returns path info on success, otherwise leaves + * receiver unlocked and returns nil. + * The returned path info is retained and autoreleased in case something + * removes it from the receiver while it's being used by the caller. */ - (GSKVOPathInfo*) lockReturningPathInfoForKey: (NSString*)key { GSKVOPathInfo *pathInfo; [iLock lock]; - pathInfo = (GSKVOPathInfo*)NSMapGet(paths, (void*)key); + pathInfo = AUTORELEASE(RETAIN((GSKVOPathInfo*)NSMapGet(paths, (void*)key))); if (pathInfo == nil) { [iLock unlock]; diff --git a/configure.ac b/configure.ac index c72e5e097..82fb0061b 100644 --- a/configure.ac +++ b/configure.ac @@ -245,7 +245,7 @@ AC_ARG_ENABLE(environment-config-file, so that the base library will not use a config file intended for the gnustep-make system (and containing unix-style paths - which cannot be used by widnows apps). + which cannot be used by windows apps). Normally this should be left at its default setting.], ac_cv_environment_config_file=$enableval,