|
Message-ID: <7950a2628d64bded0252d7cdcebe76b1@smtp.hushmail.com> Date: Tue, 28 Jul 2015 02:30:04 +0200 From: magnum <john.magnum@...hmail.com> To: john-dev@...ts.openwall.com Subject: Re: Ambiguous pointer increments On 2015-07-28 01:11, jfoug@....net wrote: > > ---- magnum <john.magnum@...hmail.com> wrote: >> The beignet OpenCL driver complained about oldoffice kernel, "multiple >> unsequenced modifications to 'p'" for things like the below: >> >> - for (i = 0; i < 32; i += 2) >> - W[i >> 1] = (uint)*p++ | (*p++ << 16U); >> >> I already changed it but I'm curious - no other driver complained. >> >> + for (i = 0; i < 32; i += 2) { >> + W[i >> 1] = (uint)*p++; >> + W[i >> 1] |= (*p++ << 16U); >> + } >> >> Originally I thought they (the use/increments of p) were guaranteed to >> be left-to-right but after this I'm not sure at all. Anyone know for >> sure? Alexander Cherepanov perhaps? In case it matters, OpenCL is C99. > > That is 100% undefined code, for sure. One of the only times you can do more than 1 increment in a statement is in the tertiary statement. I was expecting that answer now. The code did work on most drivers and devices though. I was hoping this bugfix would make the format work on super's Tahitis, but it didn't :-( I found some clues for that stupid issue now btw, https://github.com/magnumripper/JohnTheRipper/issues/1497 but I'm still trying to find a workaround that doesn't impact performance. Need some sleep now. magnum
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.