pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/parallel/pocl



Module Name:    pkgsrc
Committed By:   nia
Date:           Thu Jun 10 11:18:06 UTC 2021

Modified Files:
        pkgsrc/parallel/pocl: Makefile distinfo
Added Files:
        pkgsrc/parallel/pocl/patches: patch-lib_CL_devices_cpuinfo.c

Log Message:
pocl: Fix a null pointer dererence if sysfs is not present *sigh*


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/parallel/pocl/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/parallel/pocl/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/parallel/pocl/patches/patch-lib_CL_devices_cpuinfo.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/parallel/pocl/Makefile
diff -u pkgsrc/parallel/pocl/Makefile:1.2 pkgsrc/parallel/pocl/Makefile:1.3
--- pkgsrc/parallel/pocl/Makefile:1.2   Thu Jun 10 10:26:32 2021
+++ pkgsrc/parallel/pocl/Makefile       Thu Jun 10 11:18:06 2021
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.2 2021/06/10 10:26:32 nia Exp $
+# $NetBSD: Makefile,v 1.3 2021/06/10 11:18:06 nia Exp $
 
 DISTNAME=      pocl-1.7
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    parallel
 MASTER_SITES=  http://portablecl.org/downloads/
 

Index: pkgsrc/parallel/pocl/distinfo
diff -u pkgsrc/parallel/pocl/distinfo:1.1 pkgsrc/parallel/pocl/distinfo:1.2
--- pkgsrc/parallel/pocl/distinfo:1.1   Thu Jun 10 09:57:40 2021
+++ pkgsrc/parallel/pocl/distinfo       Thu Jun 10 11:18:06 2021
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2021/06/10 09:57:40 nia Exp $
+$NetBSD: distinfo,v 1.2 2021/06/10 11:18:06 nia Exp $
 
 SHA1 (pocl-1.7.tar.gz) = 7f28546ac51d89ba699cc5adce1ddf2e91bdf230
 RMD160 (pocl-1.7.tar.gz) = 75555c802bf133298d615f5c146174dc0f959a72
@@ -8,6 +8,7 @@ SHA1 (patch-CMakeLists.txt) = 314c492b03
 SHA1 (patch-config.h.in.cmake) = 974fad1f19516ef0b73f7db5b3948e677f4aaf98
 SHA1 (patch-lib_CL_devices_basic_basic.c) = 9110d868a305cefc2e19fd7d7482f6ce2b8a6164
 SHA1 (patch-lib_CL_devices_common.c) = c276aa967a1cc79b2bd6029b287b887bdb2b0010
+SHA1 (patch-lib_CL_devices_cpuinfo.c) = 70c4948c4948134e05d165ca0e8f6bd6fa68754b
 SHA1 (patch-lib_CL_devices_devices.c) = 17a5bb001086befdf88452b7e1126d2f5f4b1fc1
 SHA1 (patch-lib_CL_devices_hsa_pocl-hsa.c) = b7b4798b6f47f4d60a914f45ba64fe8448accdb9
 SHA1 (patch-lib_CL_devices_pthread_pthread.c) = afc0ab5544300d141d1fbfe5b7fe18af281365fa

Added files:

Index: pkgsrc/parallel/pocl/patches/patch-lib_CL_devices_cpuinfo.c
diff -u /dev/null pkgsrc/parallel/pocl/patches/patch-lib_CL_devices_cpuinfo.c:1.1
--- /dev/null   Thu Jun 10 11:18:06 2021
+++ pkgsrc/parallel/pocl/patches/patch-lib_CL_devices_cpuinfo.c Thu Jun 10 11:18:06 2021
@@ -0,0 +1,22 @@
+$NetBSD: patch-lib_CL_devices_cpuinfo.c,v 1.1 2021/06/10 11:18:06 nia Exp $
+
+Do not segfault if /sys/bus/pci/devices/0000:00:00.0/vendor does not exist.
+
+--- lib/CL/devices/cpuinfo.c.orig      2021-05-19 08:12:19.000000000 +0000
++++ lib/CL/devices/cpuinfo.c
+@@ -416,9 +416,12 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_
+   if (!device->vendor_id)
+     {
+       f = fopen (pci_bus_root_vendor_file, "r");
+-      num_read = fscanf (f, "%x", &device->vendor_id);
+-      fclose (f);
+-      /* no error checking, if it failed we just won't have the info */
++      if (f)
++        {
++          /* no error checking, if it failed we just won't have the info */
++          num_read = fscanf (f, "%x", &device->vendor_id);
++          fclose (f);
++        }
+     }
+ }
+ 



Home | Main Index | Thread Index | Old Index