kayrick

clCreateContextFromType

Discussion created by kayrick on Mar 10, 2010
Latest reply on Mar 11, 2010 by genaganna
Segmentation fault

I am trying to use opencl as low level parallel interface in compiler.

 

But some executables get segmentation fault error on clCreateContextFromType() call.

 


Code, generated by compiler (in c-like language) listed below.

Also there is same code in assembly language.

D.5897_529 = (long int) 4228; context_properties.525[0] = D.5897_529; D.5898_530 = context_properties.525[0]; D.5899_531 = (long int) 140737351792784; context_properties.525[1] = D.5899_531; D.5900_532 = context_properties.525[1]; context_properties.525[2] = 0; D.5901_533 = context_properties.525[2]; D.5960_605 = clCreateContextFromType (&context_properties.525, 2, 0B, 0B, 0B); xorl %r8d, %r8d xorl %ecx, %ecx xorl %edx, %edx movl $2, %esi movl $context_properties.525.5739, %edi movabsq $140737351792784, %rbx movq $4228, context_properties.525.5739(%rip) movq %rbx, context_properties.525.5739+8(%rip) movq $0, context_properties.525.5739+16(%rip) call clCreateContextFromType

Outcomes