Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1.15.x] util/memhooks: Fix a bug when calculating mprotect region #9559

Closed
wants to merge 1 commit into from

Conversation

shijin-aws
Copy link
Contributor

backport #9552

@j-xiong
Copy link
Contributor

j-xiong commented Nov 14, 2023

@shijin-aws Could you rebase this one to pick up CI changes in the v1.15.x branch? ubuntu 18.04 and macos 10.5 runners don't seem to be working any more.

@shijin-aws
Copy link
Contributor Author

macos check failed

common/shared.c:3677:45: error: use of undeclared identifier 'mask'
        return sched_setaffinity(0, sizeof(mask), &mask);
                                                   ^
9 errors generated.
make[1]: *** [common/shared.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
common/hmem.c:172:25: error: no member named '__builtin___memset_chk' in 'struct ft_hmem_ops'
        return hmem_ops[iface].memset(device, buf, value, size);
               ~~~~~~~~~~~~~~~ ^
/Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:77:3: note: expanded from macro 'memset'
                __builtin___memset_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
                ^
common/hmem.c:172:32: warning: incompatible integer to pointer conversion passing 'uint64_t' (aka 'unsigned long long') to parameter of type 'const void *' [-Wint-conversion]
        return hmem_ops[iface].memset(device, buf, value, size);
                                      ^~~~~~
/Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:77:62: note: expanded from macro 'memset'
                __builtin___memset_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
                                                                           ^~~~
/Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_common.h:38:55: note: expanded from macro '__darwin_obsz0'
#define __darwin_obsz0(object) __builtin_object_size (object, 0)
                                                      ^~~~~~
1 warning and 1 error generated.
make[1]: *** [common/hmem.lo] Error 1
make: *** [all] Error 2
Error: Process completed with exit code 2.

Doesn't relate to this change though

@j-xiong
Copy link
Contributor

j-xiong commented Nov 15, 2023

@shijin-aws That's right. Some CPU affinity setting related definitions are missing for osx fabtests build. It's also weird that the compiler would replace the struct member memset with a built-in name.

@j-xiong
Copy link
Contributor

j-xiong commented Nov 15, 2023

I would ignore the macos build result for this PR.

@shijin-aws
Copy link
Contributor Author

Same segfaults as v1.17.x backport, will look into

@j-xiong
Copy link
Contributor

j-xiong commented Nov 17, 2023

Please rebase to allow build checks to pass and get Intel CI to run (instead of being stuck). Same for #9557 and #9558.

In ofi_write_patch, the bound should be the page end for the
end of the address + data_size. And since it's the end of the page,
when calculating the length, it needs to add 1 to make the length
a multiple of page size.

Signed-off-by: Shi Jin <[email protected]>
(cherry picked from commit faf4ff4)
@a-szegel
Copy link
Contributor

bot:aws:retest

@shijin-aws shijin-aws closed this Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants