Skip to content

Commit 6354314

Browse files
authored
Merge pull request #482 from abergeron/fix_segfault
Fix segfault in Theano 0.9
2 parents a242d6b + d159801 commit 6354314

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/gpuarray_buffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ gpukernel *gpukernel_init(gpucontext *ctx, unsigned int count,
162162
const char *fname, unsigned int numargs,
163163
const int *typecodes, int flags, int *ret,
164164
char **err_str) {
165-
gpukernel *res;
165+
gpukernel *res = NULL;
166166
int err;
167167
err = ctx->ops->kernel_alloc(&res, ctx, count, strings, lengths, fname,
168168
numargs, typecodes, flags, err_str);

src/gpuarray_elemwise.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -740,12 +740,12 @@ void GpuElemwise_free(GpuElemwise *ge) {
740740
}
741741

742742
int GpuElemwise_call(GpuElemwise *ge, void **args, int flags) {
743-
size_t n;
744-
size_t *dims;
745-
ssize_t **strides;
746-
unsigned int nd;
747-
int contig;
748-
int call32;
743+
size_t n = 0;
744+
size_t *dims = NULL;
745+
ssize_t **strides = NULL;
746+
unsigned int nd = 0;
747+
int contig = 0;
748+
int call32 = 0;
749749
int err;
750750

751751
err = check_contig(ge, args, &n, &contig);

0 commit comments

Comments
 (0)