Go to file
Tom de Vries 4a75460b00 [nvptx, libgomp] Fix cuMemAlloc with size zero
Consider test-case:
...
int
main (void)
{
  #pragma acc parallel async
  ;
  #pragma acc parallel async
  ;
  #pragma acc wait

  return 0;
}
...

This fails with:
...
libgomp: cuMemAlloc error: invalid argument
Segmentation fault (core dumped)
...
The cuMemAlloc error is due to the fact that we're try to allocate 0 bytes.

Fix this by preventing calling map_push with size zero argument in nvptx_exec.

This also has the consequence that for the abort-1.c test-case, we end up
calling cuMemFree during map_fini for the struct cuda_map allocated in
map_init, which fails because an abort happened.  Fix this by calling
cuMemFree with CUDA_CALL_NOCHECK in cuda_map_destroy.

2019-01-23  Tom de Vries  <tdevries@suse.de>

	PR target/PR88946
	* plugin/plugin-nvptx.c (cuda_map_destroy): Use CUDA_CALL_NOCHECK for
	cuMemFree.
	(nvptx_exec): Don't call map_push if mapnum == 0.
	* testsuite/libgomp.oacc-c-c++-common/pr88946.c: New test.

From-SVN: r268178
2019-01-23 08:16:56 +00:00
config
contrib GCN back-end config 2019-01-17 12:34:28 +00:00
fixincludes
gcc Warray-bounds-2.c: Include headers only if they exist. 2019-01-22 17:23:21 -07:00
gnattools
gotools libgo: update to Go1.12beta2 2019-01-18 19:04:36 +00:00
include PR other/16615 [2/5] 2019-01-09 16:39:49 -05:00
INSTALL
intl
libada
libatomic
libbacktrace * allocfail.c (main): Increase portability of printf statement. 2019-01-20 15:09:02 +00:00
libcc1
libcpp
libdecnumber
libffi
libgcc Bump version of __gcov_indirect_call_profiler function as there was ABI change. 2019-01-18 11:32:53 +00:00
libgfortran GCN libgfortran. 2019-01-17 12:27:46 +00:00
libgo golang.org/x/tools/go/analysis: pass "gccgo" to types.SizesFor 2019-01-22 15:43:40 +00:00
libgomp [nvptx, libgomp] Fix cuMemAlloc with size zero 2019-01-23 08:16:56 +00:00
libhsail-rt
libiberty re PR lto/88422 (collect2.exe: fatal error: lto-wrapper returned 1 exit status: file not recognized: file truncated) 2019-01-22 09:47:52 +00:00
libitm
libobjc PR other/16615 [4/5] 2019-01-09 16:44:56 -05:00
liboffloadmic PR other/16615 [1/5] 2019-01-09 16:37:45 -05:00
libphobos libphobos: Add Fiber/Thread support for StackGrowsUp. 2019-01-18 01:51:36 +00:00
libquadmath
libsanitizer Remove svn:executable property from a couple of text files 2019-01-12 01:20:04 +01:00
libssp
libstdc++-v3 PR libstdc++/88740 Print assertion messages to stderr 2019-01-22 16:08:18 +00:00
libvtv
lto-plugin
maintainer-scripts
zlib Makefile.am (noinst_LTLIBRARIES): Rename libzgcj_convience.la to libz_convenience.la. 2019-01-21 17:23:58 +00:00
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog MAINTAINERS: add myself. 2019-01-22 03:16:30 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure GCN back-end config 2019-01-17 12:34:28 +00:00
configure.ac GCN back-end config 2019-01-17 12:34:28 +00:00
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS MAINTAINERS: add myself. 2019-01-22 03:16:30 +00:00
Makefile.def
Makefile.in Lower sampling rate for autofdo bootstrap 2019-01-15 03:49:45 +00:00
Makefile.tpl Lower sampling rate for autofdo bootstrap 2019-01-15 03:49:45 +00:00
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.