You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon a closer look, that code inget_compute_capability() may be dead anyway? We check for if (!major) { before reaching the "Apple, VCL and some other environments" fallback code that checks device names. However, major is a pointer that is supposed to be non-NULL, or if it happens to actually be NULL then we'd crash on trying to assign values to *major. If this was broken for years, should we drop it? Also, it would be cleaner for that function itself to initialize *major and *minor to 0 rather than rely on each caller having done so (and simplify the callers).
We should still verify the logic of get_processors_count() for 4000 series cards - maybe it's correct as-is (the major >= 7 path does what's needed), or maybe we need to add a major check.
Upon a closer look, that code inget_compute_capability() may be dead anyway? We check for if (!major) { before reaching the "Apple, VCL and some other environments" fallback code that checks device names. However, major is a pointer that is supposed to be non-NULL
Looks like a bug introduced in 2021 with 8fa21b5, where @magnumripper added detection of a few more card series (IIRC on my suggestion), but apparently broke this all (and I did not catch that in my review). So now we need to decide between fixing that bug vs. dropping this legacy code.
solardiz
added a commit
to solardiz/john
that referenced
this issue
Jan 2, 2024
We should probably add a check to
get_compute_capability()
and maybe toget_processors_count()
inopencl_common.c
.The text was updated successfully, but these errors were encountered: