[PATCH v2 3/3] fhandler/proc.cc: use wincap.has_user_shstk
Brian Inglis
Brian.Inglis@Shaw.ca
Fri Jun 16 00:12:40 GMT 2023
On 2023-06-15 01:11, Corinna Vinschen wrote:
> Hi Brian,
>
> thanks, that looks good, except this single snippet:
>
> On Jun 7 10:37, Brian Inglis wrote:
>> ---
>> winsup/cygwin/fhandler/proc.cc | 8 ++++----
>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/winsup/cygwin/fhandler/proc.cc b/winsup/cygwin/fhandler/proc.cc
>> index 3c79762e0fbd..2eaf436dc122 100644
>> --- a/winsup/cygwin/fhandler/proc.cc
>> +++ b/winsup/cygwin/fhandler/proc.cc
>> @@ -1486,12 +1486,12 @@ format_proc_cpuinfo (void *, char *&destbuf)
>>
>> /* ftcprint (features1, 6, "split_lock_detect");*//* MSR_TEST_CTRL split lock */
>>
>> - /* cpuid 0x00000007 ecx & Windows [20]20H1/[20]2004+ */
>> - if (maxf >= 0x00000007 && wincap.osname () >= "10.0"
>> - && wincap.build_number () >= 19041)
>> + /* Windows [20]20H1/[20]2004/19041 user shadow stack */
>> + if (maxf >= 0x00000007 && wincap.has_user_shstk)
> ^^^^^^^^^^^^^^^^^^^^^
>
> wincapc::has_user_shstk is a method, accessing the wincaps::has_user_shstk
> member. The parens are missing. Consequentially I see an error when
> trying to build it:
>
> winsup/cygwin/fhandler/proc.cc:1490:40: error: invalid use of member ‘bool wincapc::has_user_shstk() const’ (did you forget the ‘&’ ?)
> 1490 | if (maxf >= 0x00000007 && wincap.has_user_shstk)
> | ~~~~~~~^~~~~~~~~~~~~~
> make[4]: *** [Makefile:2068: fhandler/proc.o] Error 1
Sorry - yes - that was a thinko caught by the build, and fixed for a redo before
testing.
Then I realized I had made the v2 changes after pulling the main branch instead
of on my local cpuinfo branch, so reset and merged the changes into the
branches, to put them back to where I thought they should be.
It is likely I either failed to commit or wiped the change, before generating
patches, as some git operations still rely on SO answers.
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry
More information about the Cygwin-patches
mailing list