Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Dec 2019 17:52:42 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r519570 - head/lang/compute-runtime/files
Message-ID:  <201912081752.xB8Hqg0M025652@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Sun Dec  8 17:52:42 2019
New Revision: 519570
URL: https://svnweb.freebsd.org/changeset/ports/519570

Log:
  lang/compute-runtime: untabify and silence -Wformat-security in the port's patch
  
  In file included from runtime/os_interface/linux/drm_memory_manager.cpp:8:
  In file included from runtime/os_interface/linux/drm_memory_manager.h:9:
  In file included from runtime/memory_manager/memory_manager.h:11:
  In file included from core/helpers/aligned_memory.h:11:
  runtime/os_interface/debug_settings_manager.h:35:17: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
          fprintf(std::forward<Args>(args)...);
                  ^~~~~~~~~~~~~~~~~~~~~~~~
  runtime/os_interface/linux/drm_memory_manager.cpp:148:21: note: in instantiation of function template specialization 'NEO::printDebugString<__sFILE *&, char const (&)[80]>' requested here
                      printDebugString(true, stderr, "ioctl(I915_GEM_USERPTR) failed. Try running as root but expect poor stability.\n");
                      ^
  runtime/os_interface/debug_settings_manager.h:35:17: note: treat the string as an argument to avoid this
          fprintf(std::forward<Args>(args)...);
                  ^
                  "%s",

Modified:
  head/lang/compute-runtime/files/patch-userptr   (contents, props changed)

Modified: head/lang/compute-runtime/files/patch-userptr
==============================================================================
--- head/lang/compute-runtime/files/patch-userptr	Sun Dec  8 17:52:36 2019	(r519569)
+++ head/lang/compute-runtime/files/patch-userptr	Sun Dec  8 17:52:42 2019	(r519570)
@@ -49,13 +49,13 @@ frame #5: 0x000000080104b4e5 libigdrcl.so`NEO::DrmMemo
 +            userptr.flags = I915_USERPTR_UNSYNCHRONIZED;
 +            if (this->drm->ioctl(DRM_IOCTL_I915_GEM_USERPTR, &userptr) != 0) {
 +                if (geteuid() != 0) {
-+                    printDebugString(true, stderr, "ioctl(I915_GEM_USERPTR) failed. Try running as root but expect poor stability.\n");
++                    printDebugString(true, stderr, "%s", "ioctl(I915_GEM_USERPTR) failed. Try running as root but expect poor stability.\n");
 +                }
 +                return nullptr;
 +            }
 +        } else {
-+	    return nullptr;
-+	}
++            return nullptr;
++        }
      }
  
      auto res = new (std::nothrow) BufferObject(this->drm, userptr.handle, rootDeviceIndex);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912081752.xB8Hqg0M025652>