From b3eee1426656bbd3efd7468fd3f6880753847e19 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 31 Aug 2018 19:06:27 +0300 Subject: [PATCH] Eliminate 'comparison is always false' code defect in get_maps In case of a single-threaded build, the comparison is always false because maps_size>=0 and old_maps_size<=0. * os_dep.c [NEED_PROC_MAPS] (GC_get_maps): Do not evaluate maps_size= maps_buf_sz || maps_size < old_maps_size); - /* In the single-threaded case, the second clause is false. */ + } while (maps_size >= maps_buf_sz +# ifdef THREADS + || maps_size < old_maps_size +# endif + ); maps_buf[maps_size] = '\0'; return maps_buf; } -- 2.7.4