From owner-svn-ports-all@freebsd.org Sun Aug 11 22:31:07 2019 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 49F41C4716; Sun, 11 Aug 2019 22:31:07 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 466DGM1Df6z4TXH; Sun, 11 Aug 2019 22:31:07 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0BCD01D18B; Sun, 11 Aug 2019 22:31:07 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7BMV6oA028319; Sun, 11 Aug 2019 22:31:06 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7BMV5Is028308; Sun, 11 Aug 2019 22:31:05 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201908112231.x7BMV5Is028308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Sun, 11 Aug 2019 22:31:05 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r508691 - in branches/2019Q3/games: openbor openbor/files openbor3482 openbor3482/files openbor3711 openbor3979 openbor3979/files openbor4432 openbor4432/files X-SVN-Group: ports-branches X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: in branches/2019Q3/games: openbor openbor/files openbor3482 openbor3482/files openbor3711 openbor3979 openbor3979/files openbor4432 openbor4432/files X-SVN-Commit-Revision: 508691 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Aug 2019 22:31:07 -0000 Author: jbeich Date: Sun Aug 11 22:31:04 2019 New Revision: 508691 URL: https://svnweb.freebsd.org/changeset/ports/508691 Log: MFH: r508689 games/openbor: fix free memory stats source/ramlib/ram.c:137:18: runtime error: unsigned integer overflow: 9420649 * 4096 cannot be represented in type 'unsigned int' Reported by: -fsanitize=integer Approved by: ports-secteam blanket Modified: branches/2019Q3/games/openbor/Makefile branches/2019Q3/games/openbor/files/patch-source_ramlib_ram.c branches/2019Q3/games/openbor3482/Makefile branches/2019Q3/games/openbor3482/files/patch-source_ramlib_ram.c branches/2019Q3/games/openbor3711/Makefile branches/2019Q3/games/openbor3979/Makefile branches/2019Q3/games/openbor3979/files/patch-source_ramlib_ram.c branches/2019Q3/games/openbor4432/Makefile branches/2019Q3/games/openbor4432/files/patch-source_ramlib_ram.c Directory Properties: branches/2019Q3/ (props changed) Modified: branches/2019Q3/games/openbor/Makefile ============================================================================== --- branches/2019Q3/games/openbor/Makefile Sun Aug 11 22:25:00 2019 (r508690) +++ branches/2019Q3/games/openbor/Makefile Sun Aug 11 22:31:04 2019 (r508691) @@ -4,7 +4,7 @@ PORTNAME= openbor # Hint: svn revision is git rev-list --count ${GH_TAGNAME} PORTVERSION?= 7066 .ifndef PKGNAMESUFFIX -PORTREVISION= 0 +PORTREVISION= 1 .endif CATEGORIES= games Modified: branches/2019Q3/games/openbor/files/patch-source_ramlib_ram.c ============================================================================== --- branches/2019Q3/games/openbor/files/patch-source_ramlib_ram.c Sun Aug 11 22:25:00 2019 (r508690) +++ branches/2019Q3/games/openbor/files/patch-source_ramlib_ram.c Sun Aug 11 22:31:04 2019 (r508691) @@ -59,8 +59,8 @@ Implement Linux-like memory stats for BSDs + { + return 0; + } -+ return (u64)((vms.v_free_count + vms.v_inactive_count -+ + vms.v_cache_count) * getpagesize()) / byte_size; ++ return (u64)(vms.v_free_count + vms.v_inactive_count ++ + vms.v_cache_count) * getpagesize() / byte_size; +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + u_int v_free_count = 0, v_inactive_count = 0, v_cache_count = 0; + size_t sz = sizeof(u_int); @@ -70,8 +70,8 @@ Implement Linux-like memory stats for BSDs + &v_inactive_count, &sz, NULL, 0); + sysctlbyname("vm.stats.vm.v_cache_count", + &v_cache_count, &sz, NULL, 0); -+ return (u64)((v_free_count + v_inactive_count + v_cache_count) -+ * getpagesize()) / byte_size; ++ return (u64)(v_free_count + v_inactive_count ++ + v_cache_count) * getpagesize() / byte_size; +#elif defined(__NetBSD__) || defined(__OpenBSD__) +# if defined(__NetBSD__) +#undef VM_UVMEXP @@ -92,8 +92,8 @@ Implement Linux-like memory stats for BSDs + { + return 0; + } -+ return (u64)((uvmexp.free + uvmexp.inactive + uvmexp.filepages -+ + uvmexp.execpages) * uvmexp.pagesize) / byte_size; ++ return (u64)(uvmexp.free + uvmexp.inactive + uvmexp.filepages ++ + uvmexp.execpages) * uvmexp.pagesize / byte_size; #elif LINUX struct sysinfo info; sysinfo(&info); Modified: branches/2019Q3/games/openbor3482/Makefile ============================================================================== --- branches/2019Q3/games/openbor3482/Makefile Sun Aug 11 22:25:00 2019 (r508690) +++ branches/2019Q3/games/openbor3482/Makefile Sun Aug 11 22:31:04 2019 (r508691) @@ -1,7 +1,7 @@ # $FreeBSD$ PORTVERSION= 3482 -PORTREVISION= 1 +PORTREVISION= 2 PKGNAMESUFFIX= ${PORTVERSION} MASTERDIR= ${.CURDIR}/../openbor Modified: branches/2019Q3/games/openbor3482/files/patch-source_ramlib_ram.c ============================================================================== --- branches/2019Q3/games/openbor3482/files/patch-source_ramlib_ram.c Sun Aug 11 22:25:00 2019 (r508690) +++ branches/2019Q3/games/openbor3482/files/patch-source_ramlib_ram.c Sun Aug 11 22:31:04 2019 (r508691) @@ -82,8 +82,8 @@ Implement Linux-like memory stats for BSDs + { + return 0; + } -+ return (u64)((vms.v_free_count + vms.v_inactive_count -+ + vms.v_cache_count) * getpagesize()) / byte_size; ++ return (u64)(vms.v_free_count + vms.v_inactive_count ++ + vms.v_cache_count) * getpagesize() / byte_size; +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + u_int v_free_count = 0, v_inactive_count = 0, v_cache_count = 0; + size_t sz = sizeof(u_int); @@ -93,8 +93,8 @@ Implement Linux-like memory stats for BSDs + &v_inactive_count, &sz, NULL, 0); + sysctlbyname("vm.stats.vm.v_cache_count", + &v_cache_count, &sz, NULL, 0); -+ return (u64)((v_free_count + v_inactive_count + v_cache_count) -+ * getpagesize()) / byte_size; ++ return (u64)(v_free_count + v_inactive_count ++ + v_cache_count) * getpagesize() / byte_size; +#elif defined(__NetBSD__) || defined(__OpenBSD__) +# if defined(__NetBSD__) +#undef VM_UVMEXP @@ -115,8 +115,8 @@ Implement Linux-like memory stats for BSDs + { + return 0; + } -+ return (u64)((uvmexp.free + uvmexp.inactive + uvmexp.filepages -+ + uvmexp.execpages) * uvmexp.pagesize) / byte_size; ++ return (u64)(uvmexp.free + uvmexp.inactive + uvmexp.filepages ++ + uvmexp.execpages) * uvmexp.pagesize / byte_size; #elif LINUX struct sysinfo info; sysinfo(&info); Modified: branches/2019Q3/games/openbor3711/Makefile ============================================================================== --- branches/2019Q3/games/openbor3711/Makefile Sun Aug 11 22:25:00 2019 (r508690) +++ branches/2019Q3/games/openbor3711/Makefile Sun Aug 11 22:31:04 2019 (r508691) @@ -1,7 +1,7 @@ # $FreeBSD$ PORTVERSION= 3711 -PORTREVISION= 1 +PORTREVISION= 2 PKGNAMESUFFIX= ${PORTVERSION} MASTERDIR= ${.CURDIR}/../openbor Modified: branches/2019Q3/games/openbor3979/Makefile ============================================================================== --- branches/2019Q3/games/openbor3979/Makefile Sun Aug 11 22:25:00 2019 (r508690) +++ branches/2019Q3/games/openbor3979/Makefile Sun Aug 11 22:31:04 2019 (r508691) @@ -1,7 +1,7 @@ # $FreeBSD$ PORTVERSION= 3979 -PORTREVISION= 1 +PORTREVISION= 2 PKGNAMESUFFIX= ${PORTVERSION} MASTERDIR= ${.CURDIR}/../openbor Modified: branches/2019Q3/games/openbor3979/files/patch-source_ramlib_ram.c ============================================================================== --- branches/2019Q3/games/openbor3979/files/patch-source_ramlib_ram.c Sun Aug 11 22:25:00 2019 (r508690) +++ branches/2019Q3/games/openbor3979/files/patch-source_ramlib_ram.c Sun Aug 11 22:31:04 2019 (r508691) @@ -82,8 +82,8 @@ Implement Linux-like memory stats for BSDs + { + return 0; + } -+ return (u64)((vms.v_free_count + vms.v_inactive_count -+ + vms.v_cache_count) * getpagesize()) / byte_size; ++ return (u64)(vms.v_free_count + vms.v_inactive_count ++ + vms.v_cache_count) * getpagesize() / byte_size; +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + u_int v_free_count = 0, v_inactive_count = 0, v_cache_count = 0; + size_t sz = sizeof(u_int); @@ -93,8 +93,8 @@ Implement Linux-like memory stats for BSDs + &v_inactive_count, &sz, NULL, 0); + sysctlbyname("vm.stats.vm.v_cache_count", + &v_cache_count, &sz, NULL, 0); -+ return (u64)((v_free_count + v_inactive_count + v_cache_count) -+ * getpagesize()) / byte_size; ++ return (u64)(v_free_count + v_inactive_count ++ + v_cache_count) * getpagesize() / byte_size; +#elif defined(__NetBSD__) || defined(__OpenBSD__) +# if defined(__NetBSD__) +#undef VM_UVMEXP @@ -115,8 +115,8 @@ Implement Linux-like memory stats for BSDs + { + return 0; + } -+ return (u64)((uvmexp.free + uvmexp.inactive + uvmexp.filepages -+ + uvmexp.execpages) * uvmexp.pagesize) / byte_size; ++ return (u64)(uvmexp.free + uvmexp.inactive + uvmexp.filepages ++ + uvmexp.execpages) * uvmexp.pagesize / byte_size; #elif LINUX struct sysinfo info; sysinfo(&info); Modified: branches/2019Q3/games/openbor4432/Makefile ============================================================================== --- branches/2019Q3/games/openbor4432/Makefile Sun Aug 11 22:25:00 2019 (r508690) +++ branches/2019Q3/games/openbor4432/Makefile Sun Aug 11 22:31:04 2019 (r508691) @@ -1,7 +1,7 @@ # $FreeBSD$ PORTVERSION= 4432 -PORTREVISION= 2 +PORTREVISION= 3 PKGNAMESUFFIX= ${PORTVERSION} MASTERDIR= ${.CURDIR}/../openbor Modified: branches/2019Q3/games/openbor4432/files/patch-source_ramlib_ram.c ============================================================================== --- branches/2019Q3/games/openbor4432/files/patch-source_ramlib_ram.c Sun Aug 11 22:25:00 2019 (r508690) +++ branches/2019Q3/games/openbor4432/files/patch-source_ramlib_ram.c Sun Aug 11 22:31:04 2019 (r508691) @@ -59,8 +59,8 @@ Implement Linux-like memory stats for BSDs + { + return 0; + } -+ return (u64)((vms.v_free_count + vms.v_inactive_count -+ + vms.v_cache_count) * getpagesize()) / byte_size; ++ return (u64)(vms.v_free_count + vms.v_inactive_count ++ + vms.v_cache_count) * getpagesize() / byte_size; +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + u_int v_free_count = 0, v_inactive_count = 0, v_cache_count = 0; + size_t sz = sizeof(u_int); @@ -70,8 +70,8 @@ Implement Linux-like memory stats for BSDs + &v_inactive_count, &sz, NULL, 0); + sysctlbyname("vm.stats.vm.v_cache_count", + &v_cache_count, &sz, NULL, 0); -+ return (u64)((v_free_count + v_inactive_count + v_cache_count) -+ * getpagesize()) / byte_size; ++ return (u64)(v_free_count + v_inactive_count ++ + v_cache_count) * getpagesize() / byte_size; +#elif defined(__NetBSD__) || defined(__OpenBSD__) +# if defined(__NetBSD__) +#undef VM_UVMEXP @@ -92,8 +92,8 @@ Implement Linux-like memory stats for BSDs + { + return 0; + } -+ return (u64)((uvmexp.free + uvmexp.inactive + uvmexp.filepages -+ + uvmexp.execpages) * uvmexp.pagesize) / byte_size; ++ return (u64)(uvmexp.free + uvmexp.inactive + uvmexp.filepages ++ + uvmexp.execpages) * uvmexp.pagesize / byte_size; #elif LINUX struct sysinfo info; sysinfo(&info);