Summary: | private memory overflow in openCL | ||
---|---|---|---|
Product: | Mesa | Reporter: | Janpieter Sollie <janpieter.sollie> |
Component: | Mesa core | Assignee: | mesa-dev |
Status: | RESOLVED INVALID | QA Contact: | mesa-dev |
Severity: | normal | ||
Priority: | medium | CC: | janpieter.sollie |
Version: | 17.2 | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
See Also: | https://bugs.freedesktop.org/show_bug.cgi?id=101952 | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 99553 | ||
Attachments: |
program source
clover dump files working program source |
Created attachment 133230 [details]
clover dump files
fyi: I ran the program through oclgrind, this reports no problems ... I ran the program with pocl, there's no problem there, I ran the program with amdgpu-pro, no problem either confirmed on -RC3 (initial report on RC2) I got it running on both pocl and clover. I will attach a working version with a built_hints.txt file included, which also includes debug information to debug memory contents. what I concluded: - atom_add does not work correctly - this workaround works, where it should not: i = ctx->l1; i+= len << 3; atom_xchg(&(ctx->l1), i); Created attachment 133403 [details]
working program source
the source contains the following modifications:
-use of local memory
-insertion of debug function
- removal of atom_add
seems like I am a very bad programmer... after investigating the OpenCL reference manual, I found out my code was unstable, and I need to fix it before I can post something useful |
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.
Created attachment 133229 [details] program source the program is attached, I debugged using the following: -gdb break 380 & print answer -investigation of answer[7] and answer[8] while in both moments of the program they point to exactly the same array, the content is different. The only thing that happened in between is the SHA1Init(&ctx), which should not interfere with output[] and k_pad/digest.