Summary: | Cast float->int leads to segmentation fault in compile-time | ||
---|---|---|---|
Product: | Beignet | Reporter: | pavelko95 |
Component: | Beignet | Assignee: | ruiling <ruiling.song> |
Status: | RESOLVED MOVED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
pavelko95
2015-11-21 22:17:01 UTC
Assert when visit uninitialized pointer. Do you have other idea? (In reply to rongyang from comment #1) > Assert when visit uninitialized pointer. Do you have other idea? There is something strange: float a = 10.; float *stack[10] = {&a}; // sigfault float a = 10.; float *stack[10] = {&a, &a, &a, &a}; // sigfault float a = 10.; float *stack[10] = {&a, &a, &a, &a, &a}; // ok float *stack[2]; // sigfault float *stack[1]; // ok float a; float *stack[2] = {&a}; // ok I take a quick look. it is related to storing pointers to private array. Gen hardware does not support accessing random address. it only support memory read/write through a surface index. so when declaring a private array of pointers, we need to analyze where it is storing pointers into the pointer array. the bug is related to analyzing the pointer's surface index in llvm_gen_backend.cpp. I will take a further look to see how to fix it. I am sorry for so late fix because of working on ocl 2.0 development. I finally make some time to fix it: https://lists.freedesktop.org/archives/beignet/2016-July/007710.html https://lists.freedesktop.org/archives/beignet/2016-July/007711.html -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/beignet/beignet/issues/17. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.